Closed jonatino closed 3 years ago
Fixed this. Had to add the inherit environment option.
subprocess_create(command_line, subprocess_option_combined_stdout_stderr | subprocess_option_inherit_environment, &process);
I still think this is an issue just based off the description for the subprocess_option_inherit_environment
option.
Feel free to close this if it's expected behavior.
I'll add a comment describing this issue to the readme, just incase the next person finds the same issue!
I've got a really weird bug that I cant seem to figure out. I'm using your library to spawn a child java process for my game client.
The problem is when I start the client using subprocess.h, it does not have any internet access at all and throws a bunch of exceptions.
Here is the C++ code which spawns that process
If I run my client from command line with the exact same params as in the C++ code it works.
Screenshot of running the process spawned manually from command line (works with internet access): https://dl.dropboxusercontent.com/s/1566obcus51qxsy/ProcessHacker_iHNItCSlU1.png
Screenshot of the running process spawned via C++/subprocess.h (no internet access and fails to resolve domain): https://dl.dropboxusercontent.com/s/tazv5eaykbeomvj/ProcessHacker_8pD2audHMF.png
Any idea what could be causing this?