You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting a child process on Windows then rust_run_program.cpp casts a process HANDLE to int and then core::run pretends that it is really a process id (a pid_t).
This is bad because (on Windows):
The HANDLE never gets closed (it leaks).
It means calling core::os::waitpid or core::run::waitpid with a pid_t that wasn't retrieved from rust_run_program will result in undefined behaviour.
it means that calling core::run::Program.get_id returns a value that isn't really the process id.
I will send a pull request to address these issues, unless there are objections.
The text was updated successfully, but these errors were encountered:
This fixes#5976.
It also removes `os::waitpid` in favour of (the existing) `run::waitpid`. I included this change because I figured it is kind of related.
r?
When starting a child process on Windows then
rust_run_program.cpp
casts a processHANDLE
toint
and thencore::run
pretends that it is really a process id (apid_t
).This is bad because (on Windows):
HANDLE
never gets closed (it leaks).core::os::waitpid
orcore::run::waitpid
with apid_t
that wasn't retrieved fromrust_run_program
will result in undefined behaviour.core::run::Program.get_id
returns a value that isn't really the process id.I will send a pull request to address these issues, unless there are objections.
The text was updated successfully, but these errors were encountered: