def test_systemCallUninterruptedByChildExit(self):
        reactor = self.buildReactor()

        # XXX Since pygobject/pygtk wants to use signal.set_wakeup_fd,
        # we aren't actually providing this functionality on the glib2
        # or gtk2 reactors yet.  See #4286 for the possibility of
        # improving this.
        skippedReactors = ["Glib2Reactor", "Gtk2Reactor", "PortableGtkReactor"]
        hasSigInterrupt = getattr(signal, "siginterrupt", None) is not None
        reactorClassName = reactor.__class__.__name__
        if reactorClassName in skippedReactors and not hasSigInterrupt:
            raise SkipTest(
                "%s is not supported without siginterrupt" % reactorClassName)
        if _signals.installHandler.__name__  == "_installHandlerUsingSignal":
            raise SkipTest("_signals._installHandlerUsingSignal doesn't support this feature")

        result = []

        def f():
            try:
                f1 = os.popen('%s -c "import time; time.sleep(0.1)"' %
                    (sys.executable,))
                f2 = os.popen('%s -c "import time; time.sleep(0.5); print \'Foo\'"' %
                    (sys.executable,))
                # The read call below will blow up with an EINTR from the
                # SIGCHLD from the first process exiting if we install a
                # SIGCHLD handler without SA_RESTART.  (which we used to do)
                result.append(f2.read())
            finally:
                reactor.stop()

        reactor.callWhenRunning(f)
        self.runReactor(reactor)
        self.assertEqual(result, ["Foo\n"])
If a child process exits while a system call is in progress, the system
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/test/test_process.py/ProcessTestsBuilderBase.test_systemCallUninterruptedByChildExit