From fd52f3c538bc6b7ee1bb6d8305c23ae27fab9279 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 25 Nov 2020 12:35:32 +0100 Subject: [PATCH] Fix incorrect daemonization by vncsession We terminated the child instead of the parent after fork(). Reported by Jan Grulich from Red Hat. --- unix/vncserver/vncsession.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.39.5