update Subprocess::terminateOrKill(0) to immediately send SIGKILL
Summary:
When calling `terminateOrKill()` with `sigtermTimeout` set to 0, just send
`SIGKILL` rather than `SIGTERM` immediately followed by `SIGKILL`.
When the timeout is 0 or negative, there doesn't seem to be much point to
sending `SIGTERM` and letting the process start executing their `SIGTERM`
handler if we just plan to immediately kill the process.
Note that this does potentially change the behavior of `terminateOrKill()`
slightly: if the child process did not handle `SIGTERM` and exits immediately
upon receipt of this signal previously the return value would indicate that
the process was killed with `SIGTERM`, while now it will indicate that the
process was killed with `SIGKILL`. However, very few call sites call
`terminateOrKill()` with a 0 timeout, and this behavior change should have
minimal impact.
Reviewed By: luciang
Differential Revision:
D39839037
fbshipit-source-id:
6f6dcdeecb16a8dd034bdec3fb168e19bf580c35