File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -314,9 +314,12 @@ impl Process {
314
314
}
315
315
316
316
// Reset signal handling so the child process starts in a
317
- // standardized state. We ignore SIGPIPE, and signal-handling
318
- // libraries often set a mask; both of these get inherited,
319
- // which most UNIX programs don't expect.
317
+ // standardized state. libstd ignores SIGPIPE, and signal-handling
318
+ // libraries often set a mask. Child processes inherit ignored
319
+ // signals and the signal mask from their parent, but most
320
+ // UNIX programs do not reset these things on their own, so we
321
+ // need to clean things up now to avoid confusing the program
322
+ // we're about to run.
320
323
let mut set: c:: sigset_t = mem:: uninitialized ( ) ;
321
324
if c:: sigemptyset ( & mut set) != 0 ||
322
325
c:: pthread_sigmask ( c:: SIG_SETMASK , & set, ptr:: null_mut ( ) ) != 0 ||
You can’t perform that action at this time.
0 commit comments