Re: [PATCH v3 10/10] run-command: block signals between fork and execve

2017-04-14 Thread Eric Wong
Brandon Williams wrote: > On 04/14, Brandon Williams wrote: > > /* > > +* restore default signal handlers here, in case > > +* we catch a signal right before execve below > > +*/ > > + for (sig = 1; sig < NSIG; sig++) { > > +

Re: [PATCH v3 10/10] run-command: block signals between fork and execve

2017-04-14 Thread Brandon Williams
On 04/14, Brandon Williams wrote: > /* > + * restore default signal handlers here, in case > + * we catch a signal right before execve below > + */ > + for (sig = 1; sig < NSIG; sig++) { > + sighandler_t old = sign

[PATCH v3 10/10] run-command: block signals between fork and execve

2017-04-14 Thread Brandon Williams
From: Eric Wong Signal handlers of the parent firing in the forked child may have unintended side effects. Rather than auditing every signal handler we have and will ever have, block signals while forking and restore default signal handlers in the child before execve. Restoring default signal h