don't overwrite io_manager_pipe if it is already set
authorSimon Marlow <marlowsd@gmail.com>
Thu, 23 Apr 2009 11:29:39 +0000 (11:29 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 23 Apr 2009 11:29:39 +0000 (11:29 +0000)
Part of the fix for #3171

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)