about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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