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: unnamed unix sockets on Linux report Name "@" in their address #7354

Closed
remyoudompheng opened this issue Feb 19, 2014 · 8 comments
Closed
Milestone

Comments

@remyoudompheng
Copy link
Contributor

@remyoudompheng remyoudompheng commented Feb 19, 2014

What steps will reproduce the problem?
1. Run the code 
http://play.golang.org/p/GSJZRDJWpS

What is the expected output? What do you see instead?

The UnixAddr is "@" but one would expect an empty string.

Expected:
&net.UnixAddr{Name:"", Net:"unix"}

Got:
&net.UnixAddr{Name:"@", Net:"unix"}

Please use labels and text to provide additional information.
@mikioh
Copy link
Contributor

@mikioh mikioh commented Feb 19, 2014

Comment 1:

changeset:   2435:8435e66a6b43
user:        Rob Pike <r@golang.org>
date:        Tue Jun 09 09:53:44 2009 -0700
https://code.google.com/p/go/source/browse/src/pkg/syscall/syscall_linux.go#355
No clues.
@remyoudompheng
Copy link
Contributor Author

@remyoudompheng remyoudompheng commented Feb 19, 2014

Comment 2:

It's a common convention (e.g. in /proc/net/unix) to name "abstract" sockets with an
initial '@', but an unnamed socket does not look like an abstract-named socket so maybe
it should be:
if pp.Path[0] == 0 && pp.Path[1] == 0 {
    sa.Name = ""
}
@mikioh
Copy link
Contributor

@mikioh mikioh commented Feb 19, 2014

Comment 3:

Feel free to send a CL if you can take care of both autobind and abstract namespace
features.
@remyoudompheng
Copy link
Contributor Author

@remyoudompheng remyoudompheng commented Feb 28, 2014

Comment 4:

With https://golang.org/cl/69910043
autobind and abstract sockets keep their '@' but the unnamed sockets become "".
@rsc
Copy link
Contributor

@rsc rsc commented Mar 4, 2014

Comment 5:

Labels changed: added release-go1.3.

Status changed to Accepted.

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 9, 2014

Comment 6:

CL https://golang.org/cl/69910043 references this issue.
@rsc
Copy link
Contributor

@rsc rsc commented Apr 22, 2014

Comment 7:

Labels changed: added release-none, removed release-go1.3.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed release-none labels Apr 10, 2015
@ysmolsky
Copy link
Member

@ysmolsky ysmolsky commented Nov 1, 2018

According to the last comment from @rsc here https://codereview.appspot.com/69910043 and lack of attention I'm closing this bug.

@ysmolsky ysmolsky closed this Nov 1, 2018
@golang golang locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.