Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall: fd passing fails on OpenBSD #3349

Closed
bradfitz opened this issue Mar 19, 2012 · 9 comments
Closed

syscall: fd passing fails on OpenBSD #3349

bradfitz opened this issue Mar 19, 2012 · 9 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@bradfitz
Copy link
Contributor

This test fails on OpenBSD:

http://code.google.com/p/go/source/detail?r=160ec5506cb7740be6702e5996fa05059578c4a5

The test is now removed from the tree, so:

$ hg update -C 160ec5506cb
and then edit src/pkg/syscall/passfd_test.go to change "probablyopenbsd" to
"openbsd", then watch it fail, unable to find the inherited UnixConn in the
child process.
@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 1:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 2:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 3:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 4:

Labels changed: added suggested.

@gopherbot
Copy link

Comment 5 by guelfey:

After looking into this issue, I found out that it is apparently due to the getsockname
implementation on OpenBSD. While the manpage states that obtaining the address is not
supported for Unix sockets, the address family doesn't seem to be set either if the
socket is not bound (see the attached example). This means that net.FileConn doesn't
recognize it as a Unix socket.

Attachments:

  1. getsockname_test.c (552 bytes)

@alberts
Copy link
Contributor

alberts commented Feb 18, 2013

Comment 6:

any chance OpenBSD has SO_DOMAIN support for getsockopt?

@gopherbot
Copy link

Comment 7 by guelfey:

nope

@mdempsky
Copy link
Member

Comment 8:

@guelfey: That bug was fixed last October
(http://www.openbsd.org/cgi-bin/cvsweb/src/sys/kern/uipc_usrreq.c#rev1.69), and will be
included in the upcoming 5.3 release.  If I run your test program on a recent snapshot
release, the output is "got 1 expected 1".

@davecheney
Copy link
Contributor

Comment 9:

This issue was closed by revision f853e9a.

Status changed to Fixed.

@bradfitz bradfitz added fixed Suggested Issues that may be good for new contributors looking for work to do. labels Feb 27, 2013
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

6 participants