From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: supervision@list.skarnet.org
Subject: Re: Understanding the syslogd-linux Service Script
Date: Sat, 12 Sep 2020 10:08:09 +0000 [thread overview]
Message-ID: <em40ed47d7-b5b4-4d61-b9d9-53f67e424d6b@elzian> (raw)
In-Reply-To: <0fa6bc96-3e7a-4622-bcf7-4a7d66d3c6be@www.fastmail.com>
>The s6-ipcserverd docs specifically state that it expects a bound
>and listening SOCK_STREAM socket, and this led me to the `ipc_accept()`
>call that the program makes. Out of curiosity, is there another
>s6-family program that handles SOCK_DGRAM sockets? Otherwise, I'll
>look in to socklog as Laurent suggested.
There is not, because the UCSPI model - the one that s6-ipcserver
implements - is about handling data *streams*, and forking a child to
handle each separate client (as the venerable inetd does).
There are workarounds and hacks to handle datagram sequences with a
similar architecture, but it's never perfect: clients have to connect
(which an additional restriction), you lose natural message boundaries,
and you don't have an explicit EOF so the child needs to die on a
timeout - which makes the thing awkward and actually *adds* complexity,
when the whole point of UCSPI is to make every component as simple as
possible.
When you need to listen to a /dev/log datagram socket, socklog is
definitely the simplest, and correct, approach.
--
Laurent
next prev parent reply other threads:[~2020-09-12 10:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 16:53 Scott Colby
2020-09-08 18:15 ` Colin Booth
2020-09-08 18:43 ` Colin Booth
2020-09-09 8:01 ` Laurent Bercot
2020-09-12 6:42 ` Scott Colby
2020-09-12 10:08 ` Laurent Bercot [this message]
2020-09-12 10:14 ` Laurent Bercot
2020-09-12 17:59 ` Scott Colby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=em40ed47d7-b5b4-4d61-b9d9-53f67e424d6b@elzian \
--to=ska-supervision@skarnet.org \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).