On Thu, Jul 17, 2014 at 8:12 PM, Hein Meling <
hein....@gmail.com> wrote:
>
> Your solution seems to work when then parent process exits cleanly. But if
> you do:
>
> func main() {
> cmd := exec.Command("sleep", "15")
> cmd.Start()
> time.Sleep(20 * time.Second)
> }
>
> And CTRL-C the parent process before it exits cleanly, then also the sleep
> process goes away. Does the same happen to your monkey.sh process?
>
> Moreover, my use case is actually somewhat more involved. That is, I would
> like to do cmd.Wait() (from different goroutines), in order to monitor the
> child processes, but I don't want the child processes to fail if the parent
> fails.
sends a signal to every process in the process group. So you want to
have a child process that is in a different process group. You do