Todd Lipcon has posted comments on this change. Change subject: [util] added Subprocess::GetExitStatus() ......................................................................
Patch Set 5: (1 comment) http://gerrit.cloudera.org:8080/#/c/4648/5/src/kudu/util/subprocess.cc File src/kudu/util/subprocess.cc: PS5, Line 349: // Block all signals for a while: if a signal delivered to the forked : // child before execv(), the parent's signal handler will be executed. : // This is not the expected behavior here. Also, some signal handlers of the : // parent is not async-signal safe (e.g., glog-related handlers). : // In the child's code, the signal handlers are reset to defaults except for : // SIGPIPE, which is ignored. It's a duplicated work since execv() resets : // the handlers as well, but at least it helps to get rid of unexpected : > In the case that the original signal was sent to the parent, then the child http://stackoverflow.com/questions/17073877/making-parent-process-wait-till-child-has-called-exec also has a nice trick at the bottom (the pipe trick) so that the parent can wait until the child has called exec() before it returns the pid -- To view, visit http://gerrit.cloudera.org:8080/4648 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic2b16e2a2a53a01982f816b9ee41cc61fd93d4bf Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Dinesh Bhat <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
