Unable to obtain target process exit code on Linux/Mac with CoreCLR debugging services #43731
Labels
area-Diagnostics-coreclr
enhancement
Product code improvement that does NOT require public API changes/additions
Milestone
Description
On Linux/Mac the exit code of the target process is obtained through waitpid (Linux docs, Apple docs, PAL code that makes use of it). However, unlike on Windows -- if multiple places in a process are calling waitpid, unless the
WNOWAIT
flag is used (which doesn't seem to exist OSX), then my understanding is that this will prevent other callers from obtaining the exit code.The debugging services open a HANDLE to the target process (as expected) through the PAL, which means that they may wind up 'owning' the exit code of the target process, but they don't, at least as far as I know, wind up propagating this exit code to the debugger.
The potential fixes I can think of are:
-or-
Regression?
No, this has never worked on Linux/Mac
The text was updated successfully, but these errors were encountered: