Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-25 17:49:21 +0400
committerChristopher Faylor <me@cgf.cx>2003-09-25 17:49:21 +0400
commitb498c877a1e89bcae895f284ba4a7778419d6ece (patch)
treed3e60bb54a59303ef657cf210d660599c7ffb00b /winsup/cygwin
parentcb86a98b3be2bdde180beee19006c81b1ad21f40 (diff)
* spawn.cc (spawn_guts): Move system signal handling stuff after CreateProcess
error check.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog13
-rw-r--r--winsup/cygwin/spawn.cc30
2 files changed, 24 insertions, 19 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b1d4211de..ea53ae594 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* shared_info.h: Update CURR_USER_MAGIC, CURR_SHARED_MAGIC and
@@ -35,15 +40,15 @@
* shared.cc: Use sizeof(user_info) in "offsets".
(user_shared_initialize): Add "reinit" argument to indicate need
to reinitialize the mapping. Replace "mount_table" by "user_shared"
- throughout. Call user_shared->mountinfo.init and
+ throughout. Call user_shared->mountinfo.init and
user_shared->delqueue.init.
(shared_info::initialize): Do not call delqueue.init.
(memory_init): Add argument to user_shared_initialize.
- * child_info.h (child_info::mount_h): Delete.
- (child_info::user_h): New.
+ * child_info.h (child_info::mount_h): Delete.
+ (child_info::user_h): New.
* sigpproc.cc (init_child_info): Use user_h instead of mount_h.
* dcrt0.cc (_dll_crt0): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::close): Use
+ * fhandler_disk_file.cc (fhandler_disk_file::close): Use
user_shared->delqueue instead of cygwin_shared->delqueue.
* fhandler_virtual.cc (fhandler_virtual::close): Ditto.
* syscalls.cc (close_all_files): Ditto.
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 422774b1f..b33966064 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -709,21 +709,6 @@ spawn_guts (const char * prog_arg, const char *const *argv,
&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
allowed since it would overwrite child data. */
if (mode != _P_OVERLAY)
@@ -747,6 +732,21 @@ spawn_guts (const char * prog_arg, const char *const *argv,
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
main thread. */
if (!cygheap->fdtab.need_fixup_before ())