Side channel for Worker Master to send real job return codes to Controller
Summary:
For non-zero WEXITED returns, the Controller can observe those return
codes by just waitpid'ing on the Worker Master. This works because
the Worker Master just exits with the same code as its forked slave.
But WSIGNALED Worker Slave information is lost, as the Worker Master
just exits with code 2 (it has no way to exit with WSIGNALED). The
Worker Master just "exit 2" and the Controller will see the exit code
as 2.
This diff adds an optional side channel. Whenever the Worker Slave
exits with non-zero exit code, the real Unix.process_status will be
sent over that side channel. The Controller reads the side channel
(if it exists) to use that real process_status, instead of the
compressed one.
Reviewed By: dabek
Differential Revision:
D7531163
fbshipit-source-id:
f9873f8110d9944869ed1bff3d56518ee9dd1365