* spawn.cc (spawn_guts): Move system signal handling stuff after CreateProcess
error check.
This commit is contained in:
parent
cb86a98b3b
commit
b498c877a1
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-25 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* spawn.cc (spawn_guts): Move system signal handling stuff after
|
||||||
|
CreateProcess error check.
|
||||||
|
|
||||||
2003-09-25 Pierre Humblet <pierre.humblet@ieee.org>
|
2003-09-25 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* shared_info.h: Update CURR_USER_MAGIC, CURR_SHARED_MAGIC and
|
* shared_info.h: Update CURR_USER_MAGIC, CURR_SHARED_MAGIC and
|
||||||
|
@ -709,21 +709,6 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
|||||||
&pi);
|
&pi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: There is a small race here */
|
|
||||||
|
|
||||||
DWORD res;
|
|
||||||
pthread_cleanup cleanup;
|
|
||||||
pthread_cleanup_push (do_cleanup, (void *) &cleanup);
|
|
||||||
if (mode == _P_SYSTEM)
|
|
||||||
{
|
|
||||||
sigset_t child_block;
|
|
||||||
cleanup.oldint = signal (SIGINT, SIG_IGN);
|
|
||||||
cleanup.oldquit = signal (SIGQUIT, SIG_IGN);
|
|
||||||
sigemptyset (&child_block);
|
|
||||||
sigaddset (&child_block, SIGCHLD);
|
|
||||||
(void) sigprocmask (SIG_BLOCK, &child_block, &cleanup.oldmask);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Restore impersonation. In case of _P_OVERLAY this isn't
|
/* Restore impersonation. In case of _P_OVERLAY this isn't
|
||||||
allowed since it would overwrite child data. */
|
allowed since it would overwrite child data. */
|
||||||
if (mode != _P_OVERLAY)
|
if (mode != _P_OVERLAY)
|
||||||
@ -747,6 +732,21 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: There is a small race here */
|
||||||
|
|
||||||
|
DWORD res;
|
||||||
|
pthread_cleanup cleanup;
|
||||||
|
pthread_cleanup_push (do_cleanup, (void *) &cleanup);
|
||||||
|
if (mode == _P_SYSTEM)
|
||||||
|
{
|
||||||
|
sigset_t child_block;
|
||||||
|
cleanup.oldint = signal (SIGINT, SIG_IGN);
|
||||||
|
cleanup.oldquit = signal (SIGQUIT, SIG_IGN);
|
||||||
|
sigemptyset (&child_block);
|
||||||
|
sigaddset (&child_block, SIGCHLD);
|
||||||
|
(void) sigprocmask (SIG_BLOCK, &child_block, &cleanup.oldmask);
|
||||||
|
}
|
||||||
|
|
||||||
/* Fixup the parent datastructure if needed and resume the child's
|
/* Fixup the parent datastructure if needed and resume the child's
|
||||||
main thread. */
|
main thread. */
|
||||||
if (!cygheap->fdtab.need_fixup_before ())
|
if (!cygheap->fdtab.need_fixup_before ())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user