We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found that the Process.Start() creates additional process named conhost.exe for each call while the subprocess module in python is not.
Process.Start()
conhost.exe
subprocess
Each instance of conhost.exe consumes approximately 5.7 MB of memory, which limits the level of concurrency.
It also affects the pwsh scripts. Actually, I found this issue when writing the pwsh script.
My questions are:
Thanks.
var info = new ProcessStartInfo("ping") { RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false, CreateNoWindow = true, Arguments = "google.com" }; var process = Process.Start(info);
.Net version: 8.0.401
subprocess.run(['ping', 'google.com'])
Python version: Python 3.12.3
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process See info in area-owners.md if you want to be subscribed.
Sorry, something went wrong.
OK. The solution is set CreateNoWindow = false.
CreateNoWindow = false
Reference: https://stackoverflow.com/questions/53328013/launch-windows-executable-without-conhost
Closing as answered
No branches or pull requests
I found that the
Process.Start()
creates additional process namedconhost.exe
for each call while thesubprocess
module in python is not.Each instance of conhost.exe consumes approximately 5.7 MB of memory, which limits the level of concurrency.
It also affects the pwsh scripts. Actually, I found this issue when writing the pwsh script.
My questions are:
conhost.exe
necessary for starting a process? If so, why?conhost.exe
or provide an option to control its behavior?Thanks.
.Net version: 8.0.401
Python version: Python 3.12.3
The text was updated successfully, but these errors were encountered: