1

(I changed the point of question into about more basic symptom.) I created child and grand child in bash script.(in Ubuntu 14.04)

#! /bin/bash

{
    sleep 21 &
    sleep 22
}&

sleep 23

But 2 kind of command to kill process group shows different result. ( I've run the kill command in another terminal at this test.)

kill -INT -<pgid>     # -> grand child(sleep 21) survives.
kill -TERM -<pgid>    # -> kills all correctly.

Could you explain what it is going on internally?

swj
  • 111
  • 1
  • 6
  • I see your latest edits are an attempt to resurrect this for reopening, but I don't think it's quite clear enough yet. I can probably edit it into shape and reopen it if you can clarify what you mean by "WCE policy". Quick googling gets me nothing even remotely promising. – tripleee Jul 07 '18 at 19:54
  • 1
    I referred to [WCE](https://www.cons.org/cracauer/sigint.html) and [Ctrl+C](http://unix.stackexchange.com/questions/149741/why-is-sigint-not-propagated-to-child-process-when-sent-to-its-parent-process) – swj Jul 09 '18 at 05:57
  • I found the answer from googling. this [page](https://stackoverflow.com/questions/45106725/why-do-shells-ignore-sigint-and-sigquit-in-backgrounded-processes) explains it well. thanks. – swj Jul 09 '18 at 08:57

0 Answers0