odd situation slightly off topic (sending file descriptors to another process)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I have coded up the standard sendfd() and recvfd() for linux to send and 
recv file descriptors.
seems to work 
(http://book.chinaunix.net/special/ebook/addisonWesley/APUE2/0201433079/ch17lev1sec4.html)
however when I recvfd() my number of open file descriptors bumps by 2 
and not 1. (using lsof -p X | wc -l)

I am not sure why the count jumps by 2 and not 1. The sendfd() is just 
sending a socket descriptor.
If I close() the provided descriptor it only closes 1 handle (again 
using lsof above).

So my recvfd() is giving me 2 but when I close() I only drop 1 and not 
2. Something is not in alignment
and just wondering if someone can shed some light on this. Thanks.

Jerry
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux