Last active
February 18, 2022 10:09
-
-
Save monkekode/49883693f359d26c67651a3d1aebafee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using Gapotchenko.FX.Diagnostics; | |
using Newtonsoft.Json; | |
namespace GetProcessEnv | |
{ | |
internal static class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var process = Process.GetProcessById(int.Parse(args[0])); | |
var env = process.ReadEnvironmentVariables(); | |
Console.WriteLine(JsonConvert.SerializeObject(env)); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment