[Bug go/56171] syscall FAILs on Solaris
ian at airs dot com
gcc-bugzilla@gcc.gnu.org
Mon Feb 11 19:16:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56171
--- Comment #6 from Ian Lance Taylor <ian at airs dot com> 2013-02-11 19:16:41 UTC ---
The two closes of file descriptor 4 that you show are actually normal and
expected for this test. The first is the deferred close of the os.File that
wraps the file descriptor, created by a call to os.NewFile. The second is the
deferred close of the file descriptor itself. The second close is deferred to
make sure that it happens even if os.NewFile fails.
Both closes are happening after the WriteMsgUnix failure.
Note that this test case execs itself in a separate process, so when using
truss you need to trace both processes to see what is happening. The
WriteMsgUnix failure is happening in the child process. It indicates that
sendmsg is returning an EBADF errno value, but I don't know why.
One place to look would be the function UnixRights in syscall/sockcmsg_unix.go.
Is that the right format for passing a file descriptor on Solaris?
More information about the Gcc-bugs
mailing list