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
an option for Subprocess child to print pid to a buffer
Summary:
Let the child process print its pid into a provided buffer.
The use-case is to that the child process can print its pid into zero'd storage in an environment variable, before the call to `execve`. Then the child process after `execve` will be able to see its own pid in that environment variable.
The caller is responsible for preparing the environment-variable vector with the buffer.
This is somewhat dangerous since the caller can provide any buffer, but it is simpler to implement the capability this way.
This follows a feature of SystemD, which spawns child processes with their pid's in the environment variable `SYSTEMD_EXEC_PID`.
Reviewed By: Gownta
Differential Revision: D70577643
fbshipit-source-id: 7d600b74ae239e74c3c57e10510d232818b43744
0 commit comments