Searched hist:"1794251 add0bd0e0d70e1454060b21b8f4656cea" (Results 1 – 3 of 3) sorted by relevance
/freebsd/bin/sh/ |
H A D | trap.h | diff 1794251add0bd0e0d70e1454060b21b8f4656cea Sun Jul 29 20:04:38 CEST 2012 Jilles Tjoelker <jilles@FreeBSD.org> sh: Fix EINTR race condition in "wait" and "set -T" using sigsuspend().
When waiting for child processes using "wait" or if "set -T" is in effect, a signal interrupts the wait. Make sure there is no window where the signal handler may be invoked (setting a flag) just before going to sleep.
There is a similar race condition in the shell language, but scripts can avoid it by exiting from the trap handler or enforcing synchronization using a fifo.
If SIGCHLD is not trapped, a signal handler must be installed for it. Only install this handler for the duration of the wait to avoid triggering unexpected [EINTR] errors elsewhere.
Note that for some reason only SIGINT and SIGQUIT interrupt a "wait" command. This remains the case.
|
H A D | trap.c | diff 1794251add0bd0e0d70e1454060b21b8f4656cea Sun Jul 29 20:04:38 CEST 2012 Jilles Tjoelker <jilles@FreeBSD.org> sh: Fix EINTR race condition in "wait" and "set -T" using sigsuspend().
When waiting for child processes using "wait" or if "set -T" is in effect, a signal interrupts the wait. Make sure there is no window where the signal handler may be invoked (setting a flag) just before going to sleep.
There is a similar race condition in the shell language, but scripts can avoid it by exiting from the trap handler or enforcing synchronization using a fifo.
If SIGCHLD is not trapped, a signal handler must be installed for it. Only install this handler for the duration of the wait to avoid triggering unexpected [EINTR] errors elsewhere.
Note that for some reason only SIGINT and SIGQUIT interrupt a "wait" command. This remains the case.
|
H A D | jobs.c | diff 1794251add0bd0e0d70e1454060b21b8f4656cea Sun Jul 29 20:04:38 CEST 2012 Jilles Tjoelker <jilles@FreeBSD.org> sh: Fix EINTR race condition in "wait" and "set -T" using sigsuspend().
When waiting for child processes using "wait" or if "set -T" is in effect, a signal interrupts the wait. Make sure there is no window where the signal handler may be invoked (setting a flag) just before going to sleep.
There is a similar race condition in the shell language, but scripts can avoid it by exiting from the trap handler or enforcing synchronization using a fifo.
If SIGCHLD is not trapped, a signal handler must be installed for it. Only install this handler for the duration of the wait to avoid triggering unexpected [EINTR] errors elsewhere.
Note that for some reason only SIGINT and SIGQUIT interrupt a "wait" command. This remains the case.
|