diff options
author | runge <runge> | 2009-01-04 03:10:39 +0000 |
---|---|---|
committer | runge <runge> | 2009-01-04 03:10:39 +0000 |
commit | 4fdb4cc67f1563156593e5b3deca80acf35f39ed (patch) | |
tree | 18a6d6ddc102aa3c91ed8bd24c863893b8f8de1b /x11vnc/cleanup.c | |
parent | 6876b85df3abc71feb26ce85bf2ef3bfae001af2 (diff) | |
download | libtdevnc-4fdb4cc67f1563156593e5b3deca80acf35f39ed.tar.gz libtdevnc-4fdb4cc67f1563156593e5b3deca80acf35f39ed.zip |
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.
Diffstat (limited to 'x11vnc/cleanup.c')
-rw-r--r-- | x11vnc/cleanup.c | 26 |
1 files changed, 25 insertions, 1 deletions
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); } } |