From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32305 invoked from network); 12 Sep 2020 10:08:12 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 12 Sep 2020 10:08:12 -0000 Received: (qmail 25154 invoked by uid 89); 12 Sep 2020 10:08:37 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 25147 invoked from network); 12 Sep 2020 10:08:37 -0000 From: "Laurent Bercot" To: supervision@list.skarnet.org Subject: Re: Understanding the syslogd-linux Service Script Date: Sat, 12 Sep 2020 10:08:09 +0000 Message-Id: In-Reply-To: <0fa6bc96-3e7a-4622-bcf7-4a7d66d3c6be@www.fastmail.com> References: <20200908184318.GB15636@cathexis.xen.prgmr.com> <0fa6bc96-3e7a-4622-bcf7-4a7d66d3c6be@www.fastmail.com> Reply-To: "Laurent Bercot" User-Agent: eM_Client/8.0.3385.0 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudeiuddgvdefucetufdoteggodftvfcurfhrohhfihhlvgemucfpfgfogfftkfevteeunffgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhhrfgggtgfgsehtqhertddtreejnecuhfhrohhmpedfnfgruhhrvghnthcuuegvrhgtohhtfdcuoehskhgrqdhsuhhpvghrvhhishhiohhnsehskhgrrhhnvghtrdhorhhgqeenucggtffrrghtthgvrhhnpedvgfevffeuleegvdektdffteegvdeiieefkeetgfeuheffheelheejhfevueeijeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht >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