On Fri, Nov 23, 2018 at 1:51 PM Olivier Taïbi <o...@olitb.net> wrote:
> Sorry about the wrong report, I just tested again and I can see the same > behaviour with OpenBSD 6.4: sending SIGTERM to the sh process after > launching sh -c 'sleep 1000' does not result in sh sending a SIGTERM to > the sleep process. > Hmm, why should it? If you wanted to kill whatever processes where started from that invocation, shouldn't you send SIGTERM to the process group? > Philip, what was your test? > : morgaine; sh -c 'while :; do :; done' & [3] 16632 : morgaine; kill 16632 [3] - Terminated sh -c "while :; do :; done" : morgaine; : morgaine; sh -c 'while :; do sleep 1; done' & [3] 59539 : morgaine; kill 59539 : morgaine; [3] - Terminated sh -c "while :; do sleep 1; done" : morgaine; sh itself doesn't ignore SIGTERM, but rather exits after receiving it. Philip Guenther