#NEWLINE# def recvfd( socketfd ) : #NEWLINE# #INDENT# '\n    Receive a file descriptor from a L{send1msg} message on the given C{AF_UNIX}\n    socket.\n\n    @param socketfd: An C{AF_UNIX} socket, attached to another process waiting\n        to send sockets via the ancillary data mechanism in L{send1msg}.\n\n    @param fd: C{int}\n\n    @return: a 2-tuple of (new file descriptor, description).\n\n    @rtype: 2-tuple of (C{int}, C{str})\n    ' #NEWLINE# ( data , flags , ancillary ) = recv1msg ( socketfd ) #NEWLINE# [ ( cmsg_level , cmsg_type , packedFD ) ] = ancillary #NEWLINE# [ unpackedFD ] = unpack ( 'i' , packedFD ) #NEWLINE# return ( unpackedFD , data )