I would like to have better tracing when creating child processes. We added tracing like this to the SAP jvm back in the day and it turned out to be highly beneficial for analyzing customer issues.
Non-exhaustive list of things to trace:
- argument vector, environment vector
- signal disposition just after fork and before exec
- process signal mask
- open files (if it can be easily obtained, eg via proc fs) after fork
- permissions on the jspawnhelper and the target binary
- which steps are executed when preparing the child process
The tracing cannot interfere with the normal workings of spawning, so for instance it should:
- preferentially be controlled via environment variable, which would allow us to trace whole process trees.
- has to go to a file since we cannot write to stdout/err
- file has to be clearly named and needs to contain the child process pid
Non-exhaustive list of things to trace:
- argument vector, environment vector
- signal disposition just after fork and before exec
- process signal mask
- open files (if it can be easily obtained, eg via proc fs) after fork
- permissions on the jspawnhelper and the target binary
- which steps are executed when preparing the child process
The tracing cannot interfere with the normal workings of spawning, so for instance it should:
- preferentially be controlled via environment variable, which would allow us to trace whole process trees.
- has to go to a file since we cannot write to stdout/err
- file has to be clearly named and needs to contain the child process pid