-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed possible SIGCHILD signal lost #2146
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @zbstao,
Thanks for your useful contribution. I've got a couple of comments relating to the coding style we use, but the functionality looks fine to me.
If you address the comments I'll enable the CI pipeline for the PR.
Thanks.
xrdp/xrdp.c
Outdated
@@ -163,11 +163,8 @@ xrdp_shutdown(int sig) | |||
static void | |||
xrdp_child(int sig) | |||
{ | |||
int safety; | |||
while (g_waitchild() >= 0) ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coding style requires spaces for indents rather than tabs, and also needs braces for the empty loop (e.g.):-
while(...)
{
}
I'm happy with the removal of the safety variable. It was introduced in f763cb3 but doesn't seem to be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry didn't say the coding style page, the code needs to be modified.
sesman/sig.c
Outdated
{ | ||
session_kill(pid); | ||
} | ||
}while (pid >= 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The while
on the same line matches the coding style, but will be rejected by our use of astyle
in the CI pipeline. Please can you place the while
on a separate line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there, but you've used a tab instead of 4 spaces in both locations. The CI still won't like that.
Apologies if I wasn't clear.
Looks great. Can you squash your commits? I'll merge it in then. |
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.
hi @matt335672 |
Thanks for your contribution @zbstao |
Fixed possible infinite loop (regression on #2146)
When multiple(eg. 20) xrdp connections are disconnected at the same time(eg. close all rdp client at the same time), zombie process will be spawned.
use xorgrdp session and set the parameter KillDisconnected to true.
I found similar code in file chansrv.c