Users browsing this thread: 1 Guest(s)
josuah
Long time nixers
This is another proposal for socket activation, which makes use of fd-passing : http://skarnet.org/software/s6/socket-activation.html

This is for daemon which already started and receive client connexion _afterward_: it will have already-opened file descriptors: a fd-passing daemon that just holds your already opened files/sockets waiting to be grabbed by an AF_INET, or AF_UNIX socket or a pipe or ...

For something that can start a new process at every connexion, I'd probably go with inetd/ucspi as jkl said.

FD passing is a little bit obscure : you call this syscall with these parameters, and the argument is going to suddenly be considered as a file descriptor to be passed to the other process.

It is nicely wrapped up in plan9port (plan9port source code is the starting point of the Go programming language which just pulled the libraries for handling all the platform-specific thing and made a language out of it, p9p did a good job on portability) :

https://github.com/9fans/plan9port/blob/...9/sendfd.c

(09-04-2020, 02:11 AM)venam Wrote: the idea of super-server

Well you are right for opening a socket is still parsing a protocol... I did not think of that.


Messages In This Thread
Unix Ricing - by venam - 29-01-2017, 11:36 AM
RE: Unix Ricing - by jkl - 29-01-2017, 12:45 PM
RE: Unix Ricing - by venam - 29-01-2017, 01:02 PM
RE: Unix Ricing - by xero - 29-01-2017, 03:40 PM
RE: Unix Ricing - by nxll - 29-01-2017, 08:05 PM
RE: Unix Ricing - by venam - 08-04-2017, 05:04 AM
RE: Unix Ricing - by jkl - 08-04-2017, 08:28 AM
RE: Unix Ricing - by venam - 09-04-2017, 04:31 AM
RE: Unix Ricing - by mrtn - 10-04-2017, 04:57 AM
RE: Unix Ricing - by pyratebeard - 10-04-2017, 07:49 AM
RE: Unix Ricing - by jkl - 10-04-2017, 09:45 AM
RE: Unix Ricing - by evbo - 10-04-2017, 02:50 PM
RE: Unix Ricing - by Halfwit - 31-05-2019, 04:56 PM
RE: Unix Ricing - by Halfwit - 05-04-2020, 01:41 AM
RE: Unix Ricing - by josuah - 08-04-2020, 04:03 PM
RE: Unix Ricing - by venam - 09-04-2020, 02:11 AM
RE: Unix Ricing - by jkl - 09-04-2020, 02:25 AM
RE: Unix Ricing - by josuah - 09-04-2020, 05:10 AM