Move the forked server into a new session and process group

Fixes #3212
This commit is contained in:
Maxime Coste 2019-11-17 22:44:49 +11:00
parent 25429a905b
commit 1de038a743

View File

@ -543,6 +543,7 @@ pid_t fork_server_to_background()
if (pid_t pid = fork()) if (pid_t pid = fork())
return pid; return pid;
setsid();
if (fork()) // double fork to orphan the server if (fork()) // double fork to orphan the server
exit(0); exit(0);