summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-11-17 22:44:49 +1100
committerMaxime Coste <mawww@kakoune.org>2019-11-17 22:44:49 +1100
commit1de038a7431f2da474559c124565cbbaa40cdff9 (patch)
treed2c95c0ad4e4489905c592790244e9fb84d9cee4 /src/main.cc
parent25429a905b717d29bdf92cb0da5347b7fef04436 (diff)
Move the forked server into a new session and process group
Fixes #3212
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 7af8c0cb..e0ce1935 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -543,6 +543,7 @@ pid_t fork_server_to_background()
if (pid_t pid = fork())
return pid;
+ setsid();
if (fork()) // double fork to orphan the server
exit(0);