o ¯b÷ã@sšddlZddlZddlZddlmZddlmZddlmZde dee e ffdd„Z e d krKe e ej d ƒƒ\ZZe ed ed ¡e e¡dSdS) éN)Úunpack)ÚTuple)ÚrecvmsgÚsocketfdÚreturnc Cs@t |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Ú unpackedFD©rú>/usr/lib/python3/dist-packages/twisted/python/test/pullpipe.pyÚrecvfds    rÚ__main__ésTest fixture data: s. )ÚosrÚsysÚstructrÚtypingrÚtwisted.python.sendmsgrÚintÚbytesrÚ__name__ÚargvÚfdÚ descriptionÚwriteÚcloserrrrÚs   ý