From 8a5a621baa9e756b34c507c3d8e2119dabe7f630 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 9 Apr 2026 02:31:43 +0000 Subject: Add s6-notify-fd-from-socket and s6-notify-socket-from-fd Also add .gitkeep files, remove old include-local/s6lockd.h, update a little bit of doc, make s6-ftrigrd pipe-only --- doc/s6-notify-fd-from-socket.html | 110 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 doc/s6-notify-fd-from-socket.html (limited to 'doc/s6-notify-fd-from-socket.html') diff --git a/doc/s6-notify-fd-from-socket.html b/doc/s6-notify-fd-from-socket.html new file mode 100644 index 0000000..2a8ea62 --- /dev/null +++ b/doc/s6-notify-fd-from-socket.html @@ -0,0 +1,110 @@ + + + + + + + s6: the s6-notify-fd-from-socket program + + + + + + +

+s6
+Software
+skarnet.org +

+ +

The s6-notify-fd-from-socket

+ +

+s6-notify-fd-from-socket is meant to be used in a run script, +when you want to use s6 to supervise a program that follows systemd's +NOTIFY_SOCKET +protocol. It converts a readiness notification sent via that protocol +into s6's native format. +

+ +

Interface

+ +
+     s6-notify-fd-from-socket [ -3 fd ] [ -f ] [ -t timeout ] prog...
+
+ + + +

Exit codes

+ +

+ s6-notify-fd-from-socket can exit before executing into prog: +

+ + + +

+ After forking, s6-notify-fd-from-socket (running as a child or +grandchild) can +exit with the following exit codes, but those are meaningless +because no process will, or should, check them. They are only +differentiated for clarity in the source code: +

+ + + +

Options

+ +
+
-3 fd, --notification-fd=fd
+
Force writing the readiness notification to descriptor fd. By default, +the notification is sent to the descriptor written in the notification-fd +file of the service directory, and it is an error if this file does not exist +(because the supervisor needs to be prepared to +receive the notification).
+ +
-t timeout, --timeout=timeout
+
Exit without notifying the supervisor if prog hasn't notified +readiness after timeout milliseconds. Default is 0, +meaning infinite: s6-notify-fd-from-socket will wait forever for +a notification, up to when prog exits.
+ +
-f, --no-doublefork
+
Make s6-notify-fd-from-socket live as a direct child of +prog rather than doubleforking. It is less costly (it might +save a millisecond), but it will leave a zombie around if prog +does not know how to reap its bastards (children it doesn't know it has). +If prog reaps everything, you can safely use this option; +otherwise, leave it alone.
+
+ +

Notes

+ + + + + + + -- cgit v1.3.1