enforce strongSwan coding rules
This commit is contained in:
@@ -80,32 +80,48 @@ fsig(int signal)
|
|||||||
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
|
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
|
||||||
{
|
{
|
||||||
if (pid == starter_pluto_pid())
|
if (pid == starter_pluto_pid())
|
||||||
|
{
|
||||||
name = " (Pluto)";
|
name = " (Pluto)";
|
||||||
|
}
|
||||||
if (pid == starter_charon_pid())
|
if (pid == starter_charon_pid())
|
||||||
|
{
|
||||||
name = " (Charon)";
|
name = " (Charon)";
|
||||||
|
}
|
||||||
if (WIFSIGNALED(status))
|
if (WIFSIGNALED(status))
|
||||||
|
{
|
||||||
DBG(DBG_CONTROL,
|
DBG(DBG_CONTROL,
|
||||||
DBG_log("child %d%s has been killed by sig %d\n",
|
DBG_log("child %d%s has been killed by sig %d\n",
|
||||||
pid, name?name:"", WTERMSIG(status))
|
pid, name?name:"", WTERMSIG(status))
|
||||||
)
|
)
|
||||||
|
}
|
||||||
else if (WIFSTOPPED(status))
|
else if (WIFSTOPPED(status))
|
||||||
|
{
|
||||||
DBG(DBG_CONTROL,
|
DBG(DBG_CONTROL,
|
||||||
DBG_log("child %d%s has been stopped by sig %d\n",
|
DBG_log("child %d%s has been stopped by sig %d\n",
|
||||||
pid, name?name:"", WSTOPSIG(status))
|
pid, name?name:"", WSTOPSIG(status))
|
||||||
)
|
)
|
||||||
|
}
|
||||||
else if (WIFEXITED(status))
|
else if (WIFEXITED(status))
|
||||||
|
{
|
||||||
DBG(DBG_CONTROL,
|
DBG(DBG_CONTROL,
|
||||||
DBG_log("child %d%s has quit (exit code %d)\n",
|
DBG_log("child %d%s has quit (exit code %d)\n",
|
||||||
pid, name?name:"", WEXITSTATUS(status))
|
pid, name?name:"", WEXITSTATUS(status))
|
||||||
)
|
)
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
DBG(DBG_CONTROL,
|
DBG(DBG_CONTROL,
|
||||||
DBG_log("child %d%s has quit", pid, name?name:"")
|
DBG_log("child %d%s has quit", pid, name?name:"")
|
||||||
)
|
)
|
||||||
|
}
|
||||||
if (pid == starter_pluto_pid())
|
if (pid == starter_pluto_pid())
|
||||||
|
{
|
||||||
starter_pluto_sigchild(pid);
|
starter_pluto_sigchild(pid);
|
||||||
|
}
|
||||||
if (pid == starter_charon_pid())
|
if (pid == starter_charon_pid())
|
||||||
|
{
|
||||||
starter_charon_sigchild(pid);
|
starter_charon_sigchild(pid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user