[Top][All Lists]

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


From: Prajeesh T
Subject: CMSG_FISTHDR() returns NULL
Date: 14 Dec 2004 11:36:15 -0000


OS details:
Redhat Linux 2.4.21-15.11.1.ELsmp #1 SMP
glibc version  2.3.2, release 95.27

I am facing a problem where the passed socket descriptor from one process is not received in the other process. sendmsg() and recvmsg() are successful, but CMSG_FIRSTHDR() returns NULL eventhough a valid socket descriptor was passed. The issue is intermittent and happens on a loaded system with a lot of network activities(TCP). Most of the times it works without any issue. The code that passes the file descriptor is copied from Richard Stevens Network Programming.

"struct msghdr" received from the kernel has the following data ,

msg_iovlen = 1, msg_control = 0xbfff5140, msg_controllen = 0, msg_flags = 0

Normal data is recevied correctly however the control data is missing.  The Unix domain socket used to pass the file descriptor is of the type SOCK_STREAM and there is no signifcant delay between the sendmsg() and recvmsg() calls. It appears to me that it is likely to be an OS issue. HenceI would like to know if this issue has been reported before.

Please reply to me directly as I am not a member of the mailiing list.

Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]