3 ms·
While there are certain socket options to share a port - two processes can share a port easily in another elegant way; just call fork(). One way of doing such
by noselasd 11y ago
While there are certain socket options to share a port - two processes can share a port easily in another elegant way; just call fork().
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.