diff options
author | runge <runge> | 2008-09-07 04:17:33 +0000 |
---|---|---|
committer | runge <runge> | 2008-09-07 04:17:33 +0000 |
commit | d5cba7a574a667f5321194cb05d0b4adcb995866 (patch) | |
tree | 2748fd38612cc63256ee864284cd8dab19f4eba1 /x11vnc/connections.c | |
parent | dbfa4ad1f78f6133bc5f50e766f7f3bfdb8fa049 (diff) | |
download | libvncserver-d5cba7a574a667f5321194cb05d0b4adcb995866.zip libvncserver-d5cba7a574a667f5321194cb05d0b4adcb995866.tar.gz |
x11vnc: kill gui_pid on exit in -connect/-connect_or_exit mode.
-grablocal n experiment (not compiled by default). -macuskbd
option for macosx for orig uskdb code. keycode=N remote contol
cmd. Find dpy look at non-NFS cookies in /tmp. Fix gui tray
insertion on recent gnome dt. Fix connect_file bug. Sync SSVNC
Diffstat (limited to 'x11vnc/connections.c')
-rw-r--r-- | x11vnc/connections.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/x11vnc/connections.c b/x11vnc/connections.c index f253204..aa656df 100644 --- a/x11vnc/connections.c +++ b/x11vnc/connections.c @@ -755,6 +755,10 @@ void client_gone(rfbClientPtr client) { if (inetd && client == inetd_client) { rfbLog("inetd viewer exited.\n"); + if (gui_pid > 0) { + rfbLog("killing gui_pid %d\n", gui_pid); + kill(gui_pid, SIGTERM); + } clean_up_exit(0); } if (connect_once) { @@ -779,6 +783,10 @@ void client_gone(rfbClientPtr client) { } rfbLog("viewer exited.\n"); + if ((client_connect || connect_or_exit) && gui_pid > 0) { + rfbLog("killing gui_pid %d\n", gui_pid); + kill(gui_pid, SIGTERM); + } clean_up_exit(0); } #ifdef MACOSX @@ -2423,6 +2431,10 @@ void reverse_connect(char *str) { if (connect_or_exit) { rfbLogEnable(1); rfbLog("exiting under -connect_or_exit\n"); + if (gui_pid > 0) { + rfbLog("killing gui_pid %d\n", gui_pid); + kill(gui_pid, SIGTERM); + } clean_up_exit(0); } return; @@ -2458,6 +2470,10 @@ void reverse_connect(char *str) { if (client_count <= nclients0) { rfbLogEnable(1); rfbLog("exiting under -connect_or_exit\n"); + if (gui_pid > 0) { + rfbLog("killing gui_pid %d\n", gui_pid); + kill(gui_pid, SIGTERM); + } clean_up_exit(0); } } @@ -2737,6 +2753,7 @@ void check_gui_inputs(void) { static int turn_off_truecolor = 0; static void turn_off_truecolor_ad(rfbClientPtr client) { + if (client) {} if (turn_off_truecolor) { rfbLog("turning off truecolor advertising.\n"); screen->serverFormat.trueColour = FALSE; |