[Bug 192109] New: recvmsg fails to receive socket FD and subsequent functions on that FD fails with EBADF error.
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jul 25 10:54:09 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192109
Bug ID: 192109
Summary: recvmsg fails to receive socket FD and subsequent
functions on that FD fails with EBADF error.
Product: Base System
Version: 9.2-RELEASE
Hardware: amd64
OS: Any
Status: Needs Triage
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: abhijit_kulkarni at symantec.com
Created attachment 144963
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144963&action=edit
sample program to reproduce problem
I have application that sends socket FD from one process to another using
sendmsg API and receives that FD using recvmsg API. It works perfectly on
FreeBSD 6 (i386-32 bits binary) but fails on FreeBSD 9.2 (amd64-64 bits binary)
. The recvmsg API does not fail but the FD, that is retuned, is no longer
socket FD hence further use of that FD fails with EBADF error.
Has anyone faced this problem before? Is this a known issue?
I have tried simple program that uses Unix domain socket and shares FD between
2 processes. It reproduces my problem. The program open file '/etc/motd' and
sends the FD to another process using sendmsg. The other process receives the
FD and prints the contents of the file. The program works perfectly on FreeBSD
6 (i386-32 bits binary) but fails to print contents of file on FreeBSD 9.2
(amd64-64 bits binary).
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list