HOME


Mini Shell 1.0
DIR: /lib/python3/dist-packages/twisted/python/test/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/twisted/python/test/__pycache__/pullpipe.cpython-312.pyc
�

Ϫ�f����ddlZddlZddlZddlmZddlmZddlmZde	dee	e
ffd�Zedk(rJee	ejd	��\ZZej ed
ezdz�ej"e�yy)�N)�unpack)�Tuple)�recvmsg�socketfd�returnc��tj|tjtj�}t	|�\}}}|\\}}}td|�\}||fS)az
    Receive a file descriptor from a L{sendmsg} message on the given C{AF_UNIX}
    socket.

    @param socketfd: An C{AF_UNIX} socket, attached to another process waiting
        to send sockets via the ancillary data mechanism in L{send1msg}.

    @param fd: C{int}

    @return: a 2-tuple of (new file descriptor, description).
    @rtype: 2-tuple of (C{int}, C{bytes})
    �i)�socket�fromfd�AF_UNIX�SOCK_STREAMrr)	r�	ourSocket�data�	ancillary�flags�	cmsgLevel�cmsgType�packedFD�
unpackedFDs	         �>/usr/lib/python3/dist-packages/twisted/python/test/pullpipe.py�recvfdrs[���
�
�h�����8J�8J�K�I�$�Y�/��D�)�U�(1�%�$�i��8��#�x�(�L�Z������__main__�sTest fixture data: s.
)�osr
�sys�structr�typingr�twisted.python.sendmsgr�int�bytesr�__name__�argv�fd�description�write�close�rr�<module>r)s���

�
�
���*��S��U�3��:�.��.�z���S����!��-�.�O�B���B�H�H�R�'�+�5��>�?��B�H�H�R�L�r