4 ms·
Seems like a useful feature for a service manager like systemd to have for its managed services. It is already able to perform inetd style socket activation, I
by jabedude 5y ago
Seems like a useful feature for a service manager like systemd to have for its managed services. It is already able to perform inetd style socket activation, I imagine this would be a welcome feature
- TimWolla 5y agoThis is already possible. You can configure whether you want inetd style socket activation (where systemd calls accept() and passes you the client socket)), or just systemd listening to the socket (where systemd passes you the listen socket and your binary calls accept()). https://www.freedesktop.org/software/systemd/man/systemd.socket.html#Accept= https://www.freedesktop.org/software/systemd/man/systemd.soc...
- jasonjayr 5y agoinetd style socket activation (iirc) forks a process for every connection. So, simply replacing the binary on disk will cause all new connections going forward to use the new binary, while existing held connections (with in-memory references to the old binary's inode) will finish the operations. Once they are done and all references to that inode are gone, the blocks referencing the binary will be removed.
- wahern 5y ago> inetd style socket activation (iirc) forks a process for every connection. inetd supports both process-per-connection and single process/multiple connections using the "nowait" and "wait" declarations, respectively. The former passes an accept'd socket, the latter passes the listening socket.
- tannhaeuser 5y agoCGI (apache's mod_cgi) has supported this since almost the beginning of the web as well. Deploying a new CGI is as simple as replacing the CGI binary.