don't overwrite io_manager_pipe if it is already set
[ghc-hetmet.git] / rts / posix / Signals.c
index c1ffb5d..ace58c2 100644 (file)
@@ -95,7 +95,9 @@ setIOManagerPipe (int fd)
 {
     // only called when THREADED_RTS, but unconditionally
     // compiled here because GHC.Conc depends on it.
-    io_manager_pipe = fd;
+    if (io_manager_pipe < 0) {
+        io_manager_pipe = fd;
+    }
 }
 
 #if defined(THREADED_RTS)