Merge pull request #2146 from zbstao/devel

Fixed possible SIGCHILD signal lost
This commit is contained in:
matt335672 2022-02-10 16:54:22 +00:00 committed by GitHub
commit 82b1aab9ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -122,12 +122,16 @@ sig_sesman_session_end(int sig)
return;
}
pid = g_waitchild();
if (pid > 0)
do
{
session_kill(pid);
pid = g_waitchild();
if (pid > 0)
{
session_kill(pid);
}
}
while (pid >= 0);
}
/******************************************************************************/

View File

@ -163,9 +163,7 @@ xrdp_shutdown(int sig)
static void
xrdp_child(int sig)
{
int safety;
for (safety = 0; (g_waitchild() >= 0) && (safety <= 10); safety++)
while (g_waitchild() >= 0)
{
}
}