

def run_isolated(klass, self, result):
    'Run a test suite or case in a subprocess, using the run method on klass.\n    '
    (c2pread, c2pwrite) = os.pipe()
    pid = os.fork()
    if (pid == 0):
        os.close(c2pread)
        os.dup2(c2pwrite, 1)
        os.close(c2pwrite)
        stream = os.fdopen(1, 'wb')
        result = TestProtocolClient(stream)
        klass.run(self, result)
        stream.flush()
        sys.stderr.flush()
        os._exit(0)
    else:
        os.close(protocol)
        protocol = TestProtocolServer(result)
        fileobj = os.fdopen(c2pread, 'rb')
        protocol.readFrom(fileobj)
        os.waitpid(pid, 0)
    return result

dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/external/subunit/__init__.py run_isolated/VarMisuse@125/182 `c2pwrite`->`protocol`