Add terminateOrKill function to folly::Subprocess to use a combination of...
Add terminateOrKill function to folly::Subprocess to use a combination of SIGTERM/SIGKILL to terminate a process. Summary: Add terminateOrKill function to folly::Subprocess to use a combination of SIGTERM/SIGKILL to terminate a process. The document has clearly indicated this class is thread-unsafe, and it's strongly suggested to call signal and wait in the same thread to avoid unintended consequence, yet there is code that tried to do that in mutliple threads and ends with potential kill(-1). By providing a function that basically does `terminate(); waitpid_with_timeout(); kill(); waitpid()`, it should help eliminate usage errors mentioned above. Reviewed By: yfeldblum Differential Revision: D17662349 fbshipit-source-id: 3a68ede5ca09270f804c88839a798ae31b615ae3
Showing
Please register or sign in to comment