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-socket-from-fd.html | 129 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 doc/s6-notify-socket-from-fd.html (limited to 'doc/s6-notify-socket-from-fd.html') diff --git a/doc/s6-notify-socket-from-fd.html b/doc/s6-notify-socket-from-fd.html new file mode 100644 index 0000000..ec2a57a --- /dev/null +++ b/doc/s6-notify-socket-from-fd.html @@ -0,0 +1,129 @@ + + + + + + + s6: the s6-notify-socket-from-fd program + + + + + + +

+s6
+Software
+skarnet.org +

+ +

The s6-notify-socket-from-fd program

+ +

+s6-notify-socket-from-fd is different from other chainloading +tools in s6, in as it's not meant to be used in s6 run scripts. Instead, +it's meant to be used when you're not using s6, but another +service manager that does not support the +s6 readiness notification protocol, +but supports the +NOTIFY_SOCKET +protocol. +

+ +

+ Typically, you would use it if you have a daemon foobard that +uses the s6 readiness notification protocol, but need to run that daemon +under systemd. Instead of running it with ExecStart=foobard and +having to use Type=main, losing the benefit of notification, you +can use ExecStart="s6-notify-socket-from-fd foobard" and +Type=notify, and systemd will handle readiness correctly. +

+ +

Interface

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

Exit codes

+ +

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

+ + + +

+ After forking, s6-notify-socket-from-fd (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

+ +
+
-d fd, --notification-fd=fd
+
Expect prog... to send its notification on descriptor fd. +Default is 1.
+ +
-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-socket-from-fd will wait forever for +a notification, up to when prog exits.
+ +
-f, --no-doublefork
+
Make s6-notify-socket-from-fd 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.
+ +
-k, --keep-environment
+
Keep the NOTIFY_SOCKET environment variable in prog's +environment. By default, the variable is removed from it, because prog, +not using the systemd notification protocol, normally has no use for it.
+
+ +

Notes

+ + + + + -- cgit v1.3.1