From 4fdb4cc67f1563156593e5b3deca80acf35f39ed Mon Sep 17 00:00:00 2001 From: runge Date: Sun, 4 Jan 2009 03:10:39 +0000 Subject: x11vnc: add -rmflag option, -rawfb vt support, bpp < 8 support for rawfb, find /dev/video better. Fix reverse SSL connection for DH. Some improvements for CUPS TS helper, restart if needed. --- x11vnc/cleanup.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'x11vnc/cleanup.c') diff --git a/x11vnc/cleanup.c b/x11vnc/cleanup.c index 610aa62..08a4e1f 100644 --- a/x11vnc/cleanup.c +++ b/x11vnc/cleanup.c @@ -155,7 +155,13 @@ void clean_up_exit(int ret) { pipeinput_fh = NULL; } - if (! dpy) exit(ret); /* raw_rb hack */ + if (! dpy) { /* raw_rb hack */ + if (rm_flagfile) { + unlink(rm_flagfile); + rm_flagfile = NULL; + } + exit(ret); + } /* X keyboard cleanups */ delete_added_keycodes(0); @@ -195,6 +201,12 @@ void clean_up_exit(int ret) { X_UNLOCK; fflush(stderr); + + if (rm_flagfile) { + unlink(rm_flagfile); + rm_flagfile = NULL; + } + exit(ret); } @@ -452,6 +464,10 @@ static void interrupted (int sig) { } else if (exit_flag <= 2) { return; } + if (rm_flagfile) { + unlink(rm_flagfile); + rm_flagfile = NULL; + } exit(4); } exit_flag++; @@ -482,6 +498,10 @@ static void interrupted (int sig) { if (sig == -1) { /* not worth trying any more cleanup, X server probably gone */ + if (rm_flagfile) { + unlink(rm_flagfile); + rm_flagfile = NULL; + } exit(3); } @@ -512,6 +532,10 @@ static void interrupted (int sig) { } if (sig) { + if (rm_flagfile) { + unlink(rm_flagfile); + rm_flagfile = NULL; + } exit(2); } } -- cgit v1.2.1