From 63b98dba790fa9835e970b8502d93258862a9373 Mon Sep 17 00:00:00 2001 From: runge Date: Wed, 5 Nov 2008 01:18:29 +0000 Subject: 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. --- x11vnc/cleanup.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'x11vnc/cleanup.c') 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 */ -- cgit v1.2.1