That would imply that two separate processes are bound to the same port right? I thought that was not possible.
That would imply that two separate processes are bound to the same port right? I thought that was not possible.
Erlang can have two versions of a module present in memory at a time. At the moment of a code upgrade, the processes working with existing connections continue to use the old code while newly accepted connections are passed to the version of the module that was loaded in between connection accepts.
One way of doing such upgrades is then for the existing code to fork() then exec() the new version. The existing old code closes the original server socket, which leaves accepting new requests to the new code. When all in-flight requests served by the old code is finished, that process can exit.
(e.g. http://stackoverflow.com/questions/14351147/perl-passing-an-...)