about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-17 16:42:49 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-17 16:42:49 +0100
commitd385d07b197cef65c2d2a800378de9152551e3e6 (patch)
tree8ce127e73de9d37a6e97410ec961e73b735f6a2c /src
parentc383c8a51f86f805c3a7e080b5ee32522076ba15 (diff)
downloadchawan-d385d07b197cef65c2d2a800378de9152551e3e6.tar.gz
Move SIGCHLD ignore call to forkserver
seems like it confuses popen()
Diffstat (limited to 'src')
-rw-r--r--src/main.nim4
-rw-r--r--src/server/forkserver.nim1
2 files changed, 1 insertions, 4 deletions
diff --git a/src/main.nim b/src/main.nim
index 8a97a384..ea5a92dd 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -1,9 +1,5 @@
 import version
 
-when defined(posix):
-  from posix import signal, SIGCHLD, SIG_IGN
-  signal(SIGCHLD, SIG_IGN)
-
 import server/forkserver
 let forks = newForkServer()
 
diff --git a/src/server/forkserver.nim b/src/server/forkserver.nim
index 5a123fcd..4a616a2e 100644
--- a/src/server/forkserver.nim
+++ b/src/server/forkserver.nim
@@ -179,6 +179,7 @@ proc runForkServer() =
     istream: newPosixStream(stdin.getFileHandle()),
     ostream: newPosixStream(stdout.getFileHandle())
   )
+  signal(SIGCHLD, SIG_IGN)
   while true:
     try:
       var cmd: ForkCommand