]> sourceware.org Git - newlib-cygwin.git/commitdiff
* spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 15 Feb 2011 18:11:50 +0000 (18:11 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 15 Feb 2011 18:11:50 +0000 (18:11 +0000)
Drop flag if creating new process failed.

winsup/cygwin/ChangeLog
winsup/cygwin/spawn.cc

index fb3d6bbbc4e5753095107a57cd73036d18323b85..a8cabeaee0ebe85091e4064fbbefa8470b673966 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-15  Corinna Vinschen  <corinna@vinschen.de>
+
+       * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
+       Drop flag if creating new process failed.
+
 2011-02-15  Corinna Vinschen  <corinna@vinschen.de>
 
        * Throughout fix copyright dates.
index 68e5572a3cbaa6a43c8a175b46ea1b6d82576731..df1eb1a6856993b3cd55158b235a52bff0a4cfd7 100644 (file)
@@ -568,7 +568,7 @@ spawn_guts (const char *prog_arg, const char *const *argv,
 loop:
   cygheap->user.deimpersonate ();
 
-  if (!real_path.iscygexec ())
+  if (!real_path.iscygexec () && mode == _P_OVERLAY)
     myself->process_state |= PID_NOTCYGWIN;
 
   if (!cygheap->user.issetuid ()
@@ -680,6 +680,7 @@ loop:
          myself->sendsig = myself->exec_sendsig;
          myself->exec_sendsig = NULL;
        }
+      myself->process_state &= ~PID_NOTCYGWIN;
       res = -1;
       goto out;
     }
This page took 0.036521 seconds and 5 git commands to generate.