From: Pierre Ossman Date: Wed, 25 Nov 2020 11:35:32 +0000 (+0100) Subject: Fix incorrect daemonization by vncsession X-Git-Tag: v1.11.90~88 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd52f3c538bc6b7ee1bb6d8305c23ae27fab9279;p=tigervnc.git Fix incorrect daemonization by vncsession We terminated the child instead of the parent after fork(). Reported by Jan Grulich from Red Hat. --- diff --git a/unix/vncserver/vncsession.c b/unix/vncserver/vncsession.c index 2b47f5f5..f78c096f 100644 --- a/unix/vncserver/vncsession.c +++ b/unix/vncserver/vncsession.c @@ -99,7 +99,7 @@ begin_daemon(void) return -1; } - if (pid == 0) + if (pid != 0) _exit(0); /* Send all stdio to /dev/null */