Fixed possible SIGCHILD signal lost
When multiple(eg. 20) xrdp connections are disconnected at the same time(eg. close all rdp client at the same time), zombie process may be spawned.
This commit is contained in:
+8
-4
@@ -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);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user