jilles 0df7adbcbe 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.
2012-07-29 18:04:38 +00:00
..
2011-05-27 20:53:07 +00:00
2012-01-01 22:17:12 +00:00
2012-01-01 22:17:12 +00:00
2012-07-11 22:17:58 +00:00
2012-01-01 22:17:12 +00:00
2012-07-15 10:49:16 +00:00
2012-01-01 22:17:12 +00:00
2012-01-01 22:17:12 +00:00
2012-05-15 22:50:47 +00:00
2011-06-24 07:29:04 +00:00
2011-11-20 21:48:50 +00:00
2011-06-18 23:43:28 +00:00
2009-12-24 18:41:14 +00:00
2011-05-27 16:00:37 +00:00
2012-02-04 23:29:07 +00:00
2012-02-04 23:12:14 +00:00