def recvfd(socketfd):
 ourSocket = socket.fromfd(socketfd, socket.AF_UNIX, socket.SOCK_STREAM)
 (data, ancillary, flags) = recvmsg(ourSocket)
 [(cmsgLevel, cmsgType, packedFD)] = ancillary
 [unpackedFD] = unpack('i', packedFD)
 return (unpackedFD, data)

def recvfd ( socketfd ) : ourSocket = socket . fromfd ( socketfd , socket . AF_UNIX , socket . SOCK_STREAM ) ( data , ancillary , flags ) = recvmsg ( ourSocket ) [ ( cmsgLevel , cmsgType , packedFD ) ] = ancillary [ unpackedFD ] = unpack ( 'i' , packedFD ) return ( unpackedFD , data )
receive a file descriptor from a l{sendmsg} message on the given c{af_unix} socket .