private static void OnSigChild(int reapAll) { // Lock to avoid races with Process.Start s_processStartLock.EnterWriteLock(); try { ProcessWaitState.CheckChildren(reapAll != 0); } finally { s_processStartLock.ExitWriteLock(); } }
private static int OnSigChild(int reapAll, int configureConsole) { // configureConsole is non zero when there are PosixSignalRegistrations that // may Cancel the terminal configuration that happens when there are no more // children using the terminal. // When the registrations don't cancel the terminal configuration, // DelayedSigChildConsoleConfiguration will be called. // Lock to avoid races with Process.Start s_processStartLock.EnterWriteLock(); try { bool childrenUsingTerminalPre = AreChildrenUsingTerminal; ProcessWaitState.CheckChildren(reapAll != 0, configureConsole != 0); bool childrenUsingTerminalPost = AreChildrenUsingTerminal; // return whether console configuration was skipped. return(childrenUsingTerminalPre && !childrenUsingTerminalPost && configureConsole == 0 ? 1 : 0); } finally { s_processStartLock.ExitWriteLock(); } }