Permalink
Browse files

Fix: No extra process in shutdown Phase

The usage of rts_eval... functions includes the creation of an eden process.
rts_evalIO is used by flushStdHandles in RtsStartup.c during the shutdown phase.
We don't create an extra processes in the shutdown case any more.
  • Loading branch information...
1 parent 43acde6 commit c6eac549f441368b664c5f7e4f96394ed6497303 @dieterle dieterle committed Mar 13, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 rts/RtsAPI.c
View
@@ -465,8 +465,11 @@ void rts_evalIO (/* inout */ Capability **cap,
tso = createStrictIOThread(*cap, RtsFlags.GcFlags.initialStkSize, p);
#if defined(PARALLEL_RTS)
- // create a process, fill in this TSO as first member thread
- newProcess(tso);
+ // if not shuting down (not called by flushStdHandles in RtsStartup.c)
+ if (p != flushStdHandles_closure){
+ // create a process, fill in this TSO as first member thread
+ newProcess(tso);
+ }
#endif
scheduleWaitThread(tso,ret,cap);
}

0 comments on commit c6eac54

Please sign in to comment.