diff options
Diffstat (limited to 'x11vnc/connections.c')
-rw-r--r-- | x11vnc/connections.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/x11vnc/connections.c b/x11vnc/connections.c index d111911..3a31f5f 100644 --- a/x11vnc/connections.c +++ b/x11vnc/connections.c @@ -595,6 +595,14 @@ int run_user_command(char *cmd, rfbClientPtr client, char *mode, char *input, for (fd=3; fd<256; fd++) { close(fd); } +/* XXX test more */ + if (!strcmp(mode, "gone")) { +#if LIBVNCSERVER_HAVE_SETSID + setsid(); +#else + setpgrp(); +#endif + } execlp("/bin/sh", "/bin/sh", "-c", cmd, (char *) NULL); exit(1); } |