3 ms·
Afaik something like xinetd forks and execs a copy of the daemon for each connection and communicates over stdin/stdout. This can work for simple services like
by justinsaccount 10y ago
Afaik something like xinetd forks and execs a copy of the daemon for each connection and communicates over stdin/stdout.
This can work for simple services like sshd which fork for each connection anyway, but would never work for something like nginx or redis.
- Dylan16807 10y agoAvoiding extra processes is good, but it's not the end of the world to exec netcat.
- JdeBP 10y agoThat is untrue. Read about "wait"/"nowait" (in the xinetd and inetd manuals, for starters).
- justinsaccount 10y agoAh, I must have been thinking of something like https://cr.yp.to/ucspi-tcp/tcpserver.html https://cr.yp.to/ucspi-tcp/tcpserver.html
- JdeBP 10y agoThen you'll enjoy reading about the nosh toolset and s6-networking, which both separate the listen-accept model into separate programs and have the ability to invoke "wait" servers with the listening socket. * http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh/ http://homepage.ntlworld.com./jonathan.deboynepollard/Softwa... * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/UCSPI.html#Softwares http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/UC... * http://skarnet.org/software/s6-networking/ http://skarnet.org/software/s6-networking/