]> sourceware.org Git - newlib-cygwin.git/commitdiff
* signal.cc (_pinfo::kill): Avoid referencing 'pid' after ESRCH.
authorChristopher Faylor <me@cgf.cx>
Tue, 3 May 2011 02:03:04 +0000 (02:03 +0000)
committerChristopher Faylor <me@cgf.cx>
Tue, 3 May 2011 02:03:04 +0000 (02:03 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/signal.cc

index 379e694c4d86763fda8ecd8a0b9793360b09b749..c830aabdb3b8202f731ad449d0d866db70ac14ac 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-02  Christopher Faylor  <me.cygwin2011@cgf.cx>
+
+       * signal.cc (_pinfo::kill): Avoid referencing 'pid' after ESRCH.
+
 2011-05-02  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
 
        * cygwin.din (pthread_attr_getstack): Export.
index 0bb767ecc7a91af78a90753e86bca14cb0911ba7..78b0f1d5bb3acbfef0bdef62c686b0ce3752c20a 100644 (file)
@@ -223,6 +223,7 @@ _pinfo::kill (siginfo_t& si)
 {
   int res;
   DWORD this_process_state;
+  pid_t this_pid;
 
   sig_dispatch_pending ();
 
@@ -247,20 +248,23 @@ _pinfo::kill (siginfo_t& si)
          si2.si_code = SI_KERNEL;
          sig_send (this, si2);
        }
+      this_pid = pid;
     }
   else if (si.si_signo == 0 && this)
     {
       this_process_state = process_state;
+      this_pid = pid;
       res = 0;
     }
   else
     {
       set_errno (ESRCH);
       this_process_state = 0;
+      this_pid = -1;
       res = -1;
     }
 
-  syscall_printf ("%d = _pinfo::kill (%d, %d), process_state %p", res, pid,
+  syscall_printf ("%d = _pinfo::kill (%d, %d), process_state %p", res, this_pid,
                  si.si_signo, this_process_state);
   return res;
 }
This page took 0.0387 seconds and 5 git commands to generate.