Commit 6fe1af4a authored by Dylan Yudaken's avatar Dylan Yudaken Committed by Facebook Github Bot

add a comment to explain non-obvious semantics

Summary: It might not be obvious that the parent in Subprocess::Options refers to the parent thread (see man PRCTL(2)).

Reviewed By: yfeldblum

Differential Revision: D15873239

fbshipit-source-id: 2a1cc840281d25030708e4d10e633c7d8a9158ed
parent 0a310d52
...@@ -388,7 +388,13 @@ class Subprocess { ...@@ -388,7 +388,13 @@ class Subprocess {
#if __linux__ #if __linux__
/** /**
* Child will receive a signal when the parent exits. * Child will receive a signal when the parent *thread* exits.
*
* This is especially important when this option is used but the calling
* thread does not block for the duration of the subprocess. If the original
* thread that created the subprocess ends then the subprocess will
* terminate. For example, thread pool executors which can reap unused
* threads may trigger this behavior.
*/ */
Options& parentDeathSignal(int sig) { Options& parentDeathSignal(int sig) {
parentDeathSignal_ = sig; parentDeathSignal_ = sig;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment