From 2aa92fd6a85a479343e6d2fb408bfc9a4e40fe18 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Mon, 30 Dec 2013 13:38:40 -0800 Subject: [PATCH] chansrv: minor change in child_signal_handler --- sesman/chansrv/chansrv.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 540d81ea..9c79f670 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1207,25 +1207,23 @@ nil_signal_handler(int sig) void DEFAULT_CC child_signal_handler(int sig) { - int i1; + int pid; LOG(0, ("child_signal_handler:")); - do { - i1 = g_waitchild(); - - if (i1 == g_exec_pid) + pid = g_waitchild(); + LOG(0, ("child_signal_handler: child pid %d", pid)); + if ((pid == g_exec_pid) && (pid > 0)) { - LOG(0, ("child_signal_handler: found pid %d", i1)); + LOG(0, ("child_signal_handler: found pid %d", pid)); //shutdownx(); } - - LOG(10, (" %d", i1)); } - while (i1 >= 0); + while (pid >= 0); } +/*****************************************************************************/ void DEFAULT_CC segfault_signal_handler(int sig) {