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
RSR sockets should set FD_CLOEXEC on platforms where this is possible.
Otherwise, an open socket will be inherited by any local child processes.
A subsequent local close of the RSR connection will not be realized by the remote end, since the socket remains open locally until the child process closes it (or exits).
The text was updated successfully, but these errors were encountered:
Pharo does not directly support close-on-exec behavior.
There is a Pharo issue for this: pharo-project/pharo#12576
Workaround for Linux:
On the Pharo Discord, Pablo reports that you can get a file descriptor from a socket handle like this: (aSocket socketHandle pointerAt: 9) signedLongAt: 1
Given the fd, one should be able to call fcntl.
I don't know whether this would work on MacOS.
For Windows, Feenk has found that calling SetHandleInformation can be used to set close-on-exec on a socket.
See their issue feenkcom/gtoolkit#4163
Regarding the question in the previous comment of whether that would work on macOS: see the snippet I gave in Zinc issue #101 for setting FD_CLOEXEC on the Zinc server’s socket which, as indicated in the comment in the snippet, I tested on macOS.
RSR sockets should set FD_CLOEXEC on platforms where this is possible.
Otherwise, an open socket will be inherited by any local child processes.
A subsequent local close of the RSR connection will not be realized by the remote end, since the socket remains open locally until the child process closes it (or exits).
The text was updated successfully, but these errors were encountered: