tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: inetd tests failing

On Wed, Mar 16, 2022 at 07:42:26AM +0100, Martin Husemann wrote:
> How does inetd replace their stdin once the connection is established?

Perhaps a shim program that manages a socket between it and the
underlying daemon - the shim can talk to inetd to coordinate the handoff
of an incoming connection and also being put back onto the idle pool
when the connection closes.

> Many deamons will do socket operations (e.g. querying the peer) early
> on startup - that would fail (or deliver bogus data) in the pre-fork
> case.

I am going to start handwaving here.  Perhaps extend kevent to snoop on
the setting of socket options on the daemon socket and replicate those
settings on an incoming connection.  Waving hands even faster, this may
not work for all daemons, make it optional so if it blows up then just
go back to the exec per connection method.

Brett Lymn
Sent from my NetBSD device.

"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",

Home | Main Index | Thread Index | Old Index