On 07/28/2016 12:45 AM, Svante Signell wrote:
> On Wed, 2016-07-27 at 23:38 +0200, Christian Seiler wrote:
>> On 07/27/2016 07:25 PM, Svante Signell wrote:
>>>  
>> (FTR: <http://paste.debian.net/785673/>, code is more or less
>> identical to the code in open-isns when it comes to sendmsg and
>> recvmsg, but it works...)
> 
> Does the open-isns code use SCM_RIGHTS too? My test cases don't work
> with both SCM_RIGHTS and SCM_CREDS used. (Haven't found SCM_RIGHTS in
> the open-isns sources though)

No, only fcntl(F_NONBLOCK) and MSG_DONTWAIT on the send calls. The
receive call (done by the server, which also gets sent SIGLOST) is
the same as in my example code, save for the fact that open-isns
wants to capture the remote address (via msg.name{,len}) in receive,
even on stream sockets. Also, open-isns uses poll() beforehand.

Regards,
Christian

Reply via email to