You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm checking out the documentation on IPC connections, but the wording is unclear to me.
It says (basically) that a named pipe in UNIX "persist until unlinked". This seems to imply that one must manually unlink when finished using it. This is untrue, because calling close() on the Server object will apparently do so for you (?).
In Windows, it claims pipes will "not persist", and are removed "when the last reference to them is closed". How exactly does this differ from the UNIX behavior? Does it have something to do with garbage collection, or the socket object falling out of scope...?
persist until unlinked is true, and this unlinking is performed on server close. So you are right, there is an ambiguity in this section in terms of who unlinks the pipe. Would you be interested in improving it through a PR?
I am not sure how exactly the windows (external) behavior is different from UNIX,
/cc @nodejs/platform-windows
@boneskull - a PR in progress to address your concerns.
Does it have something to do with garbage collection, or the socket object falling out of scope...?
I did the below check and determined that the collection is done by the operating system, not Node.js . As you can see, the named pipe is removed when the program is abruptly terminated. This is different from UNIX where the DOMAIN socket persists on such abrupt termination. So the reference count is maintained by Windows.
Activity
gireeshpunathil commentedon Jan 26, 2018
persist until unlinkedis true, and this unlinking is performed on server close. So you are right, there is an ambiguity in this section in terms of who unlinks the pipe. Would you be interested in improving it through a PR?I am not sure how exactly the windows (external) behavior is different from UNIX,
/cc @nodejs/platform-windows
gireeshpunathil commentedon Mar 20, 2018
@boneskull - a PR in progress to address your concerns.
I did the below check and determined that the
collectionis done by the operating system, not Node.js . As you can see, the named pipe is removed when the program is abruptly terminated. This is different from UNIX where the DOMAIN socket persists on such abrupt termination. So the reference count is maintained by Windows.from the powershell:
Hoep this helps!
gireeshpunathil commentedon Mar 29, 2018
@boneskull - have a look at the PR and see if you believe the changes meets your expected clarity and coverage.
doc: clarify lifecycle of domain sockets
gireeshpunathil commentedon Apr 6, 2018
closing as addressed.
doc: clarify lifecycle of domain sockets
doc: clarify lifecycle of domain sockets