ϪfddlZddlZddlZddlmZddlmZddlmZde dee e ffdZ e dk(rJe e ejd \ZZej ed ezd zej"eyy) N)unpack)Tuple)recvmsgsocketfdreturnctj|tjtj}t |\}}}|\\}}}t d|\}||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)socketfromfdAF_UNIX SOCK_STREAMrr) r ourSocketdata ancillaryflags cmsgLevelcmsgTypepackedFD unpackedFDs >/usr/lib/python3/dist-packages/twisted/python/test/pullpipe.pyrecvfdrs[ h8J8JKI$Y/D)U(1%$i8#x(LZ  __main__sTest fixture data: s. )osr sysstructrtypingrtwisted.python.sendmsgrintbytesr__name__argvfd descriptionwritecloserrr)s  *SU3:.. zS!-.OB  BHHR'+5>? BHHRLr