Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: kill(getpid(), 0) will fail X-Emacs: Emacs 20.2, MULE 3.0 (MOMIJINOGA), Meadow-1.00 (MIDORI) MIME-Version: 1.0 (generated by SEMI MIME-Edit 0.100 - "Shijima") Content-Type: text/plain; charset=US-ASCII From: Kazuhiro Fujieda Date: 25 Feb 1999 14:19:52 +0900 Message-ID: Lines: 45 X-Mailer: Semi-gnus 6.0.4 (based on Quassia Gnus v0.23) kill(getpid(), 0) will fail. This is used to check kill() in the configure script included in rcs-5.7. kill_worker() passes `myself_nowait_nomain' to proc_exists() instead of `myself', but proc_exists() takes no account of it. I believe this is the only case that `myself_nowait_nomain' is passed to proc_exists(). So the following patch can fix this problem. --- signal.cc- Wed Feb 03 13:55:21 1999 +++ signal.cc Thu Feb 25 13:55:41 1999 @@ -145,17 +145,20 @@ kill_worker (pid_t pid, int sig) return -1; } - if (dest == myself && !sendSIGCONT) - dest = myself_nowait_nonmain; if (sig == 0) res = proc_exists (dest) ? 0 : -1; - else if ((res = sig_send (dest, sig))) + else { - wm_printf ("%d = sig_send, %E ", res); - res = -1; + if (dest == myself && !sendSIGCONT) + dest = myself_nowait_nonmain; + if ((res = sig_send (dest, sig))) + { + wm_printf ("%d = sig_send, %E ", res); + res = -1; + } + else if (sendSIGCONT) + (void) sig_send (dest, SIGCONT); } - else if (sendSIGCONT) - (void) sig_send (dest, SIGCONT); syscall_printf ("%d = kill_worker (%d, %d)", res, pid, sig); return res; ____ | AIST Kazuhiro Fujieda | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology