aboutsummaryrefslogtreecommitdiff
path: root/hurd/hurdexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurdexec.c')
-rw-r--r--hurd/hurdexec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c
index e358d846c8..317d7ea0ad 100644
--- a/hurd/hurdexec.c
+++ b/hurd/hurdexec.c
@@ -362,6 +362,7 @@ retry:
if (!err)
{
int flags;
+ sigset_t old, new;
if (pdp)
{
@@ -420,6 +421,15 @@ retry:
if (__sigismember (&_hurdsig_traced, SIGKILL))
flags |= EXEC_SIGTRAP;
#endif
+
+ /* Avoid getting interrupted while exec(), notably not after the exec
+ server has committed to the exec and started thrashing us.
+
+ TODO Rather add proper interrupt support to the exec server, that
+ avoids interrupts in that period. */
+ __sigfillset (&new);
+ __sigprocmask (SIG_SETMASK, &new, &old);
+
err = __file_exec_paths (file, task, flags,
path ? path : "",
abspath ? abspath : "",
@@ -440,6 +450,8 @@ retry:
ints, INIT_INT_MAX,
please_dealloc, pdp - please_dealloc,
portnames, nportnames);
+
+ __sigprocmask (SIG_SETMASK, &old, NULL);
}
/* Release references to the standard ports. */