async def test_close_connection_in_child(self, master_host):
        """
        A connection owned by a parent and closed by a child doesn't
        destroy the file descriptors so a parent can still use it.
        """
        conn = Connection(host=master_host)
        await conn.send_command("ping")
        assert await conn.read_response() == b"PONG"

        def target(conn):
            async def atarget(conn):
                await conn.send_command("ping")
                assert conn.read_response() == b"PONG"
                await conn.disconnect()

            asyncio.get_event_loop().run_until_complete(atarget(conn))

        proc = multiprocessing.Process(target=target, args=(conn,))
        proc.start()
        proc.join(3)
        assert proc.exitcode == 0

        # The connection was created in the parent but disconnected in the
        # child. The child called socket.close() but did not call
        # socket.shutdown() because it wasn't the "owning" process.
        # Therefore the connection still works in the parent.
        await conn.send_command("ping")
        assert await conn.read_response() == b"PONG"

        A connection owned by a parent and closed by a child doesn't
        destroy the file descriptors so a parent can still use it.
        
tests/test_multiprocessing.py