diff options
author | jsorg71 <jsorg71> | 2009-08-21 17:23:49 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2009-08-21 17:23:49 +0000 |
commit | 359a1908509f213372987c314b13e963bbb9961a (patch) | |
tree | cca918ae77b64d3d029491e152bf769b66ac3252 /sesman/sessvc/sessvc.c | |
parent | 18a5e7917d12bfda3cddd94f0c7f555824a1af88 (diff) | |
download | xrdp-proprietary-359a1908509f213372987c314b13e963bbb9961a.tar.gz xrdp-proprietary-359a1908509f213372987c314b13e963bbb9961a.zip |
stop channel server, then xserver
Diffstat (limited to 'sesman/sessvc/sessvc.c')
-rw-r--r-- | sesman/sessvc/sessvc.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sesman/sessvc/sessvc.c b/sesman/sessvc/sessvc.c index c74cde2b..651bccc2 100644 --- a/sesman/sessvc/sessvc.c +++ b/sesman/sessvc/sessvc.c @@ -100,11 +100,24 @@ main(int argc, char** argv) { lerror = g_get_errno(); } - /* kill X server */ - g_sigterm(x_pid); - /* kill channel server */ - g_sigterm(chansrv_pid); g_writeln("xrdp-sessvc: WM is dead (waitpid said %d, errno is %d) " "exiting...", ret, lerror); + /* kill channel server */ + g_writeln("xrdp-sessvc: stopping channel server"); + g_sigterm(chansrv_pid); + ret = g_waitpid(chansrv_pid); + while ((ret == 0) && !g_term) + { + ret = g_waitpid(chansrv_pid); + } + /* kill X server */ + g_writeln("xrdp-sessvc: stopping X server"); + g_sigterm(x_pid); + ret = g_waitpid(x_pid); + while ((ret == 0) && !g_term) + { + ret = g_waitpid(x_pid); + } + g_writeln("xrdp-sessvc: clean exit"); return 0; } |