From ca366aeea0b47b7ea1fcdf83dd05ad4e03d39c16 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Fri, 17 Jul 2009 16:57:07 +0200 Subject: [PATCH] enforce strongSwan coding rules --- src/starter/starter.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/starter/starter.c b/src/starter/starter.c index 2d2f452b5..24ce940cd 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -80,32 +80,48 @@ fsig(int signal) while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { if (pid == starter_pluto_pid()) + { name = " (Pluto)"; + } if (pid == starter_charon_pid()) + { name = " (Charon)"; + } if (WIFSIGNALED(status)) + { DBG(DBG_CONTROL, DBG_log("child %d%s has been killed by sig %d\n", pid, name?name:"", WTERMSIG(status)) ) + } else if (WIFSTOPPED(status)) + { DBG(DBG_CONTROL, DBG_log("child %d%s has been stopped by sig %d\n", pid, name?name:"", WSTOPSIG(status)) ) + } else if (WIFEXITED(status)) + { DBG(DBG_CONTROL, DBG_log("child %d%s has quit (exit code %d)\n", pid, name?name:"", WEXITSTATUS(status)) ) + } else + { DBG(DBG_CONTROL, DBG_log("child %d%s has quit", pid, name?name:"") ) + } if (pid == starter_pluto_pid()) + { starter_pluto_sigchild(pid); + } if (pid == starter_charon_pid()) + { starter_charon_sigchild(pid); + } } } break;