Skip to content

Conversation

@jeanregisser
Copy link
Contributor

@jeanregisserjeanregisser commented May 9, 2016

Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

I found out that calling the following code would create a UNIX socket with a truncated path:

constnet=require('net');varserver=net.createServer();server.listen('/tmp/0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz');// On the FS it ends up creating '/tmp/0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnop' // i.e. 103 chars on OSX instead of the initial 113 chars

Internally it ends up calling uv_pipe_bind with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind

This is NOT a bug, but a restriction of the unix socket api, as it stores the path in sockaddr_un.sun_path (104 chars on OSX, 108 chars on Linux), see man unix.

@nodejs-github-botnodejs-github-bot added the doc Issues and PRs related to the documentations. label May 9, 2016
@mscdexmscdex added the net Issues and PRs related to the net subsystem. label May 9, 2016
doc/api/net.md Outdated
Copy link
Member

@bnoordhuisbnoordhuisMay 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convention in the documentation seems to be to spell it as 'OS X' (space before the X.)

EDIT: In the commit log as well.

@bnoordhuis
Copy link
Member

LGTM with nit.

/cc @nodejs/documentation

Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`.
@jeanregisserjeanregisserforce-pushed the doc-unix-sock-path-listen branch from 8e72712 to f0423d0CompareMay 10, 2016 08:43
@jasnell
Copy link
Member

LGTM

2 similar comments
@estliberitas
Copy link
Contributor

LGTM

@addaleax
Copy link
Member

LGTM

addaleax pushed a commit that referenced this pull request May 12, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
@addaleax
Copy link
Member

Landed in 4c24fbf, removed trailing whitespace upon landing. Thanks!

evanlucas pushed a commit that referenced this pull request May 17, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
@MylesBorins
Copy link
Contributor

@addaleax lts?

@addaleax
Copy link
Member

@thealphanerd yep 👍

MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.netIssues and PRs related to the net subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@jeanregisser@bnoordhuis@jasnell@estliberitas@addaleax@MylesBorins@mscdex@nodejs-github-bot