summaryrefslogtreecommitdiffstats
path: root/x11vnc/cleanup.c
diff options
context:
space:
mode:
authorrunge <runge>2008-11-05 01:18:29 +0000
committerrunge <runge>2008-11-05 01:18:29 +0000
commit63b98dba790fa9835e970b8502d93258862a9373 (patch)
tree52b5ba99d6f9fe4b8a818eee16955e5e4e5b50de /x11vnc/cleanup.c
parentcb67ada73b007d5f237a281576f753ec6c15844b (diff)
downloadlibvncserver-63b98dba790fa9835e970b8502d93258862a9373.zip
libvncserver-63b98dba790fa9835e970b8502d93258862a9373.tar.gz
x11vnc: add zeroconf external helpers (avahi-publish and
dns-sd). Alias -zeroconf. Close pipeinput_fh on exit. Kludge to make -solid work on MacOSX console. Attempt at cpp macros to disable newer libvncserver interfaces.
Diffstat (limited to 'x11vnc/cleanup.c')
-rw-r--r--x11vnc/cleanup.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/x11vnc/cleanup.c b/x11vnc/cleanup.c
index 3a584bb..e290977 100644
--- a/x11vnc/cleanup.c
+++ b/x11vnc/cleanup.c
@@ -30,7 +30,7 @@ XErrorEvent *trapped_xerror_event;
int crash_debug = 0;
void clean_shm(int quick);
-void clean_up_exit (int ret);
+void clean_up_exit(int ret);
int trap_xerror(Display *d, XErrorEvent *error);
int trap_xioerror(Display *d);
int trap_getimage_xerror(Display *d, XErrorEvent *error);
@@ -110,7 +110,7 @@ static void clean_icon_mode(void) {
/*
* Normal exiting
*/
-void clean_up_exit (int ret) {
+void clean_up_exit(int ret) {
static int depth = 0;
exit_flag = 1;
@@ -150,6 +150,11 @@ void clean_up_exit (int ret) {
}
#endif
+ if (pipeinput_fh != NULL) {
+ pclose(pipeinput_fh);
+ pipeinput_fh = NULL;
+ }
+
if (! dpy) exit(ret); /* raw_rb hack */
/* X keyboard cleanups */
OpenPOWER on IntegriCloud