From: Erik Faye-Lund Date: Sat, 07 Jan 2012 12:45:03 GMT Subject: Re: [PATCH 1/5] run-command: optionally kill children on exit Message-ID: In-Reply-To: <1325936567-3136-2-git-send-email-drizzd@aon.at> On Sat, Jan 7, 2012 at 12:42 PM, Clemens Buchacher wrote: > +static void cleanup_children(int sig) > +{ > +       while (children_to_clean) { > +               struct child_to_clean *p = children_to_clean; > +               children_to_clean = p->next; > +               kill(p->pid, sig); > +               free(p); > +       } > +} > + > +static void cleanup_children_on_signal(int sig) > +{ > +       cleanup_children(sig); > +       sigchain_pop(sig); > +       raise(sig); > +} > + Our Windows implementation of kill (mingw_kill in compat/mingw.c) only supports SIGKILL, so propagating other signals to child-processes will fail with EINVAL. That being said, Windows' support for signals is severely limited, but I'm not entirely sure which ones can be generated in this case. > @@ -312,6 +375,7 @@ fail_pipe: >                cmd->pid = -1; >        } >        close(notify_pipe[0]); > + >  } >  #else >  { This hunk is probably unintentional...