bash-custom-action/bash-3.2-sigrestart.patch

31 lines
856 B
Diff
Raw Normal View History

--- jobs.c
+++ jobs.c 2008-01-08 19:10:15.575513024 +0100
@@ -2344,7 +2344,11 @@ wait_for (pid)
act.sa_handler = SIG_DFL;
sigemptyset (&act.sa_mask);
sigemptyset (&oact.sa_mask);
+# if defined(MUST_REINSTALL_SIGHANDLERS)
act.sa_flags = 0;
+# else
+ act.sa_flags = SA_RESTART;
+# endif
sigaction (SIGCHLD, &act, &oact);
# endif
queue_sigchld = 1;
--- sig.c
+++ sig.c 2008-01-08 19:09:14.823789614 +0100
@@ -586,6 +586,13 @@ set_signal_handler (sig, handler)
act.sa_flags |= SA_INTERRUPT; /* XXX */
else
act.sa_flags |= SA_RESTART; /* XXX */
+#else
+# if !defined(MUST_REINSTALL_SIGHANDLERS)
+ if (sig == SIGCHLD)
+ act.sa_flags |= SA_RESTART; /* XXX */
+ if (sig == SIGWINCH)
+ act.sa_flags |= SA_RESTART; /* XXX */
+# endif
#endif
sigemptyset (&act.sa_mask);
sigemptyset (&oact.sa_mask);