socket_send & socket_recv fail when sending non-socket ports

2010-07-27 Thread Emilio Pozuelo Monfort
Hi, While adding support for SCM_RIGHTS to glibc, I've created a testcase that sends and receives some ports on the result of a socketpair() call. The ports sent were initially the two ports result of another socketpair() call, and it was working fine, but then I tried with the result of a couple

[PATCH] Add support to send file descriptors over Unix sockets

2010-07-27 Thread Emilio Pozuelo Monfort
Hi, This patch adds support for SCM_RIGHTS to glibc. It works fine when sending file descriptors from a socket() or a socketpair() call, but not from e.g. an open() call, as I've mentioned in another mail. That's not because of my patch though. The attached testcase runs fine with the #if set to

Re: socket_send & socket_recv fail when sending non-socket ports

2010-07-27 Thread Roland McGrath
I don't know off hand why you're getting that failure mode. But in general you can't use MACH_MSG_TYPE_MOVE_SEND in Hurd RPC arguments (only for replies) because of the interrupt retry issue. That could be related to this failure though I can't really see how at the moment. Thanks, Roland