diff options
81 files changed, 555 insertions, 209 deletions
@@ -28,8 +28,8 @@ /s6-svdt /s6-svdt-clear /s6-permafailon -/s6-svdir-link -/s6-svdir-unlink +/s6-svlink +/s6-svunlink /s6-envdir /s6-envuidgid /s6-fghack @@ -8,6 +8,8 @@ In 2.11.0.0 - s6-svwait now supports -r and -R options to wait for restarts. - New service directory file: lock-fd, to take a lock before starting a service, protecting against concurrent instances. + - s6/lock.h, s6/supervise.h, s6/fdholder.h: simpler header names + - New binaries: s6-svlink, s6-svunlink In 2.10.0.3 diff --git a/doc/index.html b/doc/index.html index d3e7e6f..ef0d786 100644 --- a/doc/index.html +++ b/doc/index.html @@ -174,6 +174,8 @@ a user interface to control those processes and monitor service states. <li><a href="s6-svok.html">The <tt>s6-svok</tt> program</a></li> <li><a href="s6-svstat.html">The <tt>s6-svstat</tt> program</a></li> <li><a href="s6-svperms.html">The <tt>s6-svperms</tt> program</a></li> +<li><a href="s6-svlink.html">The <tt>s6-svlink</tt> program</a></li> +<li><a href="s6-svunlink.html">The <tt>s6-svunlink</tt> program</a></li> <li><a href="s6-svwait.html">The <tt>s6-svwait</tt> program</a></li> <li><a href="s6-svlisten1.html">The <tt>s6-svlisten1</tt> program</a></li> <li><a href="s6-svlisten.html">The <tt>s6-svlisten</tt> program</a></li> diff --git a/doc/libs6/s6-fdholder.html b/doc/libs6/fdholder.html index 4a2fb25..c874805 100644 --- a/doc/libs6/s6-fdholder.html +++ b/doc/libs6/fdholder.html @@ -17,10 +17,10 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>s6-fdholder</tt> library interface </h1> +<h1> The <tt>fdholder</tt> library interface </h1> <p> - The <tt>s6-fdholder</tt> library provides an API for clients + The <tt>fdholder</tt> library provides an API for clients wanting to communicate with a <a href="../s6-fdholderd.html">s6-fdholderd</a> daemon. </p> @@ -28,7 +28,7 @@ wanting to communicate with a <h2> Programming </h2> <p> - Check the <tt>s6/s6-fdholder.h</tt> header for the + Check the <tt>s6/fdholder.h</tt> header for the exact function prototypes. </p> diff --git a/doc/libs6/index.html b/doc/libs6/index.html index 2f93493..1db2e5e 100644 --- a/doc/libs6/index.html +++ b/doc/libs6/index.html @@ -65,9 +65,9 @@ provides functions to check credentials against configuration files. </li> functions to subscribe to fifodirs and be notified of events. </li> <li> The <a href="ftrigw.html">s6/ftrigw.h</a> header provides functions to manage fifodirs and send notifications to them. </li> - <li> The <a href="s6lock.html">s6/s6lock.h</a> header provides + <li> The <a href="lock.html">s6/lock.h</a> header provides functions to acquire locks with a timeout. </li> - <li> The <a href="s6-fdholder.html">s6/s6-fdholder.h</a> header provides + <li> The <a href="fdholder.html">s6/fdholder.h</a> header provides functions to communicate with a <a href="../s6-fdholderd.html">s6-fdholderd</a> server and exchange file descriptors with it. </li> diff --git a/doc/libs6/s6lock.html b/doc/libs6/lock.html index 049ed44..1cc896d 100644 --- a/doc/libs6/s6lock.html +++ b/doc/libs6/lock.html @@ -31,7 +31,7 @@ poll-free locks that can timeout during attempted acquisition. <h2> Programming </h2> <ul> - <li> Check the <tt>s6/s6lock.h</tt> header + <li> Check the <tt>s6/lock.h</tt> header for the prototypes. The functions documented here are often simplified macros, for instance relying on the STAMP global variable to hold the current time. Fully reentrant functions with more control diff --git a/doc/s6-svlink.html b/doc/s6-svlink.html new file mode 100644 index 0000000..2e03eec --- /dev/null +++ b/doc/s6-svlink.html @@ -0,0 +1,111 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6: the s6-svlink program</title> + <meta name="Description" content="s6: the s6-svlink program" /> + <meta name="Keywords" content="s6 command s6-svlink supervision service start scandir servicedir" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The s6-svlink program </h1> + +<p> + <tt>s6-svlink</tt> creates, in a <a href="scandir.html">scan +directory</a>, a symlink to a <a href="servicedir.html">service +directory</a>, and notifies <a href="s6-svscan.html">s6-svscan</a> +that a new service has been registered. It waits until a +<a href="s6-supervise.html">s6-supervise</a> supervisor process has +been spawned to manage the new service, then exits. +</p> + +<p> + The point of <tt>s6-svlink</tt> is to help integrate existing +service directories into an existing service manager sequence and +eliminating race conditions. +</p> + +<h2> Interface </h2> + +<pre> + s6-svlink [ -d | -D ] [ -P ] [ -f ] [ -t <em>timeout</em> ] <em>scandir</em> <em>servicedir</em> [ <em>name</em> ] +</pre> + +<ul> + <li> <tt>s6-svlink</tt> expects a running <a href="s6-svscan.html">s6-svscan</a> +process on <em>scandir</em> and a fully functional, but unsupervised, +<a href="servicedir.html">service directory</a> in <em>servicedir</em>. </li> + <li> It symlinks <em>servicedir</em> into <em>scandir</em>. The symbolic link +is named <em>name</em>; if no <em>name</em> argument has been given, the name given +to the symbolic link is the basename of <em>servicedir</em>. </li> + <li> It sends a command to <a href="s6-svscan.html">s6-svscan</a> to signal it +that a new service is available. </li> + <li> It waits for a <a href="s6-supervise.html">s6-supervise</a> process to be +spawned on <em>servicedir</em>. </li> + <li> It exits 0. </li> +</ul> + +<h2> Exit codes </h2> + +<ul> + <li> 0: success </li> + <li> 99: timeout while waiting for the supervisor to start </li> + <li> 100: wrong usage </li> + <li> 111: system call failed </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-d</tt> : down. The supervisor will be started, but the service +itself will remain down. Any <em>servicedir</em><tt>/down</tt> file will be +deleted. By default, if neither the <tt>-d</tt> nor <tt>-D</tt> options have +been given, the supervisor auto-starts the service as soon as it runs. </li> + <li> <tt>-D</tt> : down, and stay down. The supervisor will be started, +but the service itself will remain down. A <em>servicedir</em><tt>/down</tt> file +will be created. By default, if neither the <tt>-d</tt> nor <tt>-D</tt> options have +been given, the supervisor auto-starts the service as soon as it runs. </li> + <li> <tt>-P</tt> : public. If <em>servicedir</em><tt>/event</tt> does not +exist, it will be created as public, i.e. anyone will be able to subscribe to +this <a href="fifodir.html">fifodir</a>. By default, it will be created as private, +i.e. only processes running with the same gid as the <a href="s6-svscan.html">s6-svscan</a> +process will be able to susbscribe to it. </li> + <li> <tt>-f</tt> : force permissions. The presence or absence of the <tt>-P</tt> +option (i.e. the public or private state of <em>servicedir</em><tt>/event</tt>) will be +enforced even if <em>servicedir</em><tt>/event</tt> already exists. By default, +<tt>s6-svlink</tt> exits with an error message if <em>servicedir</em><tt>/event</tt> +exists and its public/private state mismatches what is requested. </li> + <li> <tt>-t <em>timeout</em></tt> : if the supervisor has not started +after <em>timeout</em> milliseconds, <tt>s6-svlink</tt> will print a message +to stderr and exit 99. By default, <em>timeout</em> is 0, which means no time +limit. </li> +</ul> + +<h2> Notes </h2> + +<ul> + <li> Using <tt>s6-svlink</tt> to start services is a suboptimal pattern: it +requires precise manipulations involving use of <a href="s6-ftrigrd.html">s6-ftrigrd</a> +in order to avoid race conditions, so it is relatively expensive. The simpler, +more efficient pattern is to have all the supervisors already started at boot +time, so the existence of the supervisor can be relied on, and starting the +service becomes a trival and instant operation - this is, for instance, how +the <a href="//skarnet.org/software/s6-rc/">s6-rc</a> service manager behaves. +However, it can be difficult to implement this pattern with other services +managers such as OpenRC; in those cases, <tt>s6-svlink</tt>, which starts the +supervisors one at a time, can be used instead. </li> + <li> If <em>servicedir</em> is logged, i.e. <em>servicedir</em><tt>/log</tt> +is also a valid service directory, then <tt>s6-svlink</tt> will wait until +supervisors have been spawned for both the service and its logger. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-svunlink.html b/doc/s6-svunlink.html new file mode 100644 index 0000000..c2ac807 --- /dev/null +++ b/doc/s6-svunlink.html @@ -0,0 +1,90 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6: the s6-svunlink program</title> + <meta name="Description" content="s6: the s6-svunlink program" /> + <meta name="Keywords" content="s6 command s6-svunlink supervision service stop unlink scandir servicedir" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The s6-svunlink program </h1> + +<p> + <tt>s6-svunlink</tt> unlinks a <a href="servicedir.html">service +directory from a <a href="scandir.html">scan directory</a>, then +notify the <a href="s6-svscan.html">s6-svscan</a> that a service has +been unregistered. It waits until the <a href="s6-supervise.html">s6-supervise</a> +supervisor process has disappeared, then exits. +</p> + +<p> + The point of <tt>s6-svunlink</tt> is to help integrate existing +service directories into an existing service manager sequence and +eliminating race conditions. +</p> + +<h2> Interface </h2> + +<pre> + s6-svunlink [ -X ] [ -t <em>timeout</em> ] <em>scandir</em> <em>name</em> +</pre> + +<ul> + <li> <tt>s6-svunlink</tt> expects a running <a href="s6-svscan.html">s6-svscan</a> +process on <em>scandir</em> and a fully functional supervised service on +<a href="servicedir.html">service directory</a> in <em>scandir</em><tt>/</tt><em>name</em>, +which must be a symbolic link to a real directory located somewhere else. </li> + <li> It deletes the <em>scandir</em><tt>/</tt><em>name</em> symlink. </li> + <li> It sends a command to <a href="s6-svscan.html">s6-svscan</a> to signal it +that a service has disappeared. </li> + <li> It waits for the <a href="s6-supervise.html">s6-supervise</a> process +managing the service directory to exit. </li> + <li> It exits 0. </li> +</ul> + +<h2> Exit codes </h2> + +<ul> + <li> 0: success </li> + <li> 100: wrong usage </li> + <li> 111: system call failed </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-X</tt> : don't wait. <tt>s6-svunlink</tt> will exit right +away, without waiting for the supervisor to exit first. </li> + <li> <tt>-t <em>timeout</em></tt> : if the supervisor has not exited +after <em>timeout</em> milliseconds, <tt>s6-svlink</tt> will still exit. +The default is 0, meaning no time limit.. </li> +</ul> + +<h2> Notes </h2> + +<ul> + <li> Using <tt>s6-svlink</tt> to stop services is a suboptimal pattern: +starting and stopping supervisors is a heavier operation than just stopping +services. The simpler, more efficient pattern is to simply perform +<a href="s6-svc.html">s6-svc -dwD <em>scandir</em><tt>/</tt><em>name</em>, +which only commands, and waits for, the death of the service, without +impacting the supervisor. Nevertheless, for symmetry with +<a href="s6-svlink">s6-svlink</a>, this program is provided. </li> + <li> <tt>s6-svunlink</tt> is a destructor; as is, it returns 0 even in +situations that are nominally a failure. For instance, it returns 0 even +if its timeout expires; the rationale is that there is no sensible action +for the user to do if this error is reported. <tt>s6-svunlink</tt> only +reports errors when they uncover a deeper problem in the system. </li> +</ul> + +</body> +</html> diff --git a/doc/upgrade.html b/doc/upgrade.html index 13e8291..44efbb2 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -29,6 +29,10 @@ optional dependency bumped to 0.1.0.2. </li> optional dependency bumped to 2.8.1.0. </li> <li> <a href="s6-svwait.html">s6-svwait</a> now supports the <tt>-r</tt> and <tt>-R</tt> options, to wait for service restarts. </li> + <li> The <tt>s6/lock.h</tt>, <tt>s6/supervise.h</tt> and <tt>s6/fdholder.h</tt> +headers replace their previous versions that had an extra <tt>s6</tt> prefix. </li> + <li> New binaries: <a href="s6-svlink.html">s6-svlink</a> and +<a href="s6-svunlink.html">s6-svunlink</a>. </li> </ul> <h2> in 2.10.0.3 </h2> diff --git a/package/deps.mak b/package/deps.mak index c2465d4..37ab05b 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -4,8 +4,8 @@ src/include/s6/compat.h: src/include/s6/config.h src/include/s6/ftrigr.h: src/include/s6/config.h -src/include/s6/s6.h: src/include/s6/accessrules.h src/include/s6/compat.h src/include/s6/ftrigr.h src/include/s6/ftrigw.h src/include/s6/s6-supervise.h src/include/s6/s6lock.h -src/include/s6/s6lock.h: src/include/s6/config.h +src/include/s6/lock.h: src/include/s6/config.h +src/include/s6/s6.h: src/include/s6/accessrules.h src/include/s6/compat.h src/include/s6/ftrigr.h src/include/s6/ftrigw.h src/include/s6/lock.h src/include/s6/supervise.h src/supervision/s6-svlisten.h: src/include/s6/ftrigr.h src/conn-tools/s6-accessrules-cdb-from-fs.o src/conn-tools/s6-accessrules-cdb-from-fs.lo: src/conn-tools/s6-accessrules-cdb-from-fs.c src/conn-tools/s6-accessrules-fs-from-cdb.o src/conn-tools/s6-accessrules-fs-from-cdb.lo: src/conn-tools/s6-accessrules-fs-from-cdb.c @@ -34,14 +34,14 @@ src/daemontools-extras/s6-tai64n.o src/daemontools-extras/s6-tai64n.lo: src/daem src/daemontools-extras/s6-tai64nlocal.o src/daemontools-extras/s6-tai64nlocal.lo: src/daemontools-extras/s6-tai64nlocal.c src/daemontools-extras/ucspilogd.o src/daemontools-extras/ucspilogd.lo: src/daemontools-extras/ucspilogd.c src/daemontools-extras/lolsyslog.h src/fdholder/s6-fdholder-daemon.o src/fdholder/s6-fdholder-daemon.lo: src/fdholder/s6-fdholder-daemon.c src/include/s6/config.h -src/fdholder/s6-fdholder-delete.o src/fdholder/s6-fdholder-delete.lo: src/fdholder/s6-fdholder-delete.c src/include/s6/s6-fdholder.h -src/fdholder/s6-fdholder-getdump.o src/fdholder/s6-fdholder-getdump.lo: src/fdholder/s6-fdholder-getdump.c src/include/s6/s6-fdholder.h -src/fdholder/s6-fdholder-list.o src/fdholder/s6-fdholder-list.lo: src/fdholder/s6-fdholder-list.c src/include/s6/s6-fdholder.h -src/fdholder/s6-fdholder-retrieve.o src/fdholder/s6-fdholder-retrieve.lo: src/fdholder/s6-fdholder-retrieve.c src/include/s6/s6-fdholder.h -src/fdholder/s6-fdholder-setdump.o src/fdholder/s6-fdholder-setdump.lo: src/fdholder/s6-fdholder-setdump.c src/include/s6/s6-fdholder.h -src/fdholder/s6-fdholder-store.o src/fdholder/s6-fdholder-store.lo: src/fdholder/s6-fdholder-store.c src/include/s6/s6-fdholder.h -src/fdholder/s6-fdholder-transferdump.o src/fdholder/s6-fdholder-transferdump.lo: src/fdholder/s6-fdholder-transferdump.c src/include/s6/s6-fdholder.h -src/fdholder/s6-fdholderd.o src/fdholder/s6-fdholderd.lo: src/fdholder/s6-fdholderd.c src/include/s6/accessrules.h src/include/s6/s6-fdholder.h +src/fdholder/s6-fdholder-delete.o src/fdholder/s6-fdholder-delete.lo: src/fdholder/s6-fdholder-delete.c src/include/s6/fdholder.h +src/fdholder/s6-fdholder-getdump.o src/fdholder/s6-fdholder-getdump.lo: src/fdholder/s6-fdholder-getdump.c src/include/s6/fdholder.h +src/fdholder/s6-fdholder-list.o src/fdholder/s6-fdholder-list.lo: src/fdholder/s6-fdholder-list.c src/include/s6/fdholder.h +src/fdholder/s6-fdholder-retrieve.o src/fdholder/s6-fdholder-retrieve.lo: src/fdholder/s6-fdholder-retrieve.c src/include/s6/fdholder.h +src/fdholder/s6-fdholder-setdump.o src/fdholder/s6-fdholder-setdump.lo: src/fdholder/s6-fdholder-setdump.c src/include/s6/fdholder.h +src/fdholder/s6-fdholder-store.o src/fdholder/s6-fdholder-store.lo: src/fdholder/s6-fdholder-store.c src/include/s6/fdholder.h +src/fdholder/s6-fdholder-transferdump.o src/fdholder/s6-fdholder-transferdump.lo: src/fdholder/s6-fdholder-transferdump.c src/include/s6/fdholder.h +src/fdholder/s6-fdholderd.o src/fdholder/s6-fdholderd.lo: src/fdholder/s6-fdholderd.c src/include/s6/accessrules.h src/include/s6/fdholder.h src/libs6/ftrig1_free.o src/libs6/ftrig1_free.lo: src/libs6/ftrig1_free.c src/libs6/ftrig1.h src/libs6/ftrig1_make.o src/libs6/ftrig1_make.lo: src/libs6/ftrig1_make.c src/libs6/ftrig1.h src/libs6/ftrigr1_zero.o src/libs6/ftrigr1_zero.lo: src/libs6/ftrigr1_zero.c src/include/s6/ftrigr.h @@ -74,46 +74,47 @@ src/libs6/s6_accessrules_params_free.o src/libs6/s6_accessrules_params_free.lo: src/libs6/s6_accessrules_uidgid_cdb.o src/libs6/s6_accessrules_uidgid_cdb.lo: src/libs6/s6_accessrules_uidgid_cdb.c src/include/s6/accessrules.h src/libs6/s6_accessrules_uidgid_fs.o src/libs6/s6_accessrules_uidgid_fs.lo: src/libs6/s6_accessrules_uidgid_fs.c src/include/s6/accessrules.h src/libs6/s6_compat_el_semicolon.o src/libs6/s6_compat_el_semicolon.lo: src/libs6/s6_compat_el_semicolon.c src/include/s6/config.h -src/libs6/s6_dtally_pack.o src/libs6/s6_dtally_pack.lo: src/libs6/s6_dtally_pack.c src/include/s6/s6-supervise.h -src/libs6/s6_dtally_read.o src/libs6/s6_dtally_read.lo: src/libs6/s6_dtally_read.c src/include/s6/s6-supervise.h -src/libs6/s6_dtally_unpack.o src/libs6/s6_dtally_unpack.lo: src/libs6/s6_dtally_unpack.c src/include/s6/s6-supervise.h -src/libs6/s6_dtally_write.o src/libs6/s6_dtally_write.lo: src/libs6/s6_dtally_write.c src/include/s6/s6-supervise.h -src/libs6/s6_fdholder_delete.o src/libs6/s6_fdholder_delete.lo: src/libs6/s6_fdholder_delete.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_delete_async.o src/libs6/s6_fdholder_delete_async.lo: src/libs6/s6_fdholder_delete_async.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_end.o src/libs6/s6_fdholder_end.lo: src/libs6/s6_fdholder_end.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_getdump.o src/libs6/s6_fdholder_getdump.lo: src/libs6/s6_fdholder_getdump.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_list.o src/libs6/s6_fdholder_list.lo: src/libs6/s6_fdholder_list.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_list_async.o src/libs6/s6_fdholder_list_async.lo: src/libs6/s6_fdholder_list_async.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_list_cb.o src/libs6/s6_fdholder_list_cb.lo: src/libs6/s6_fdholder_list_cb.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_retrieve.o src/libs6/s6_fdholder_retrieve.lo: src/libs6/s6_fdholder_retrieve.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_retrieve_async.o src/libs6/s6_fdholder_retrieve_async.lo: src/libs6/s6_fdholder_retrieve_async.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_retrieve_cb.o src/libs6/s6_fdholder_retrieve_cb.lo: src/libs6/s6_fdholder_retrieve_cb.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_setdump.o src/libs6/s6_fdholder_setdump.lo: src/libs6/s6_fdholder_setdump.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_start.o src/libs6/s6_fdholder_start.lo: src/libs6/s6_fdholder_start.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_store.o src/libs6/s6_fdholder_store.lo: src/libs6/s6_fdholder_store.c src/include/s6/s6-fdholder.h -src/libs6/s6_fdholder_store_async.o src/libs6/s6_fdholder_store_async.lo: src/libs6/s6_fdholder_store_async.c src/include/s6/s6-fdholder.h -src/libs6/s6_supervise_link.o src/libs6/s6_supervise_link.lo: src/libs6/s6_supervise_link.c src/include/s6/s6-supervise.h -src/libs6/s6_supervise_link_names.o src/libs6/s6_supervise_link_names.lo: src/libs6/s6_supervise_link_names.c src/include/s6/ftrigr.h src/include/s6/ftrigw.h src/include/s6/s6-supervise.h -src/libs6/s6_supervise_unlink.o src/libs6/s6_supervise_unlink.lo: src/libs6/s6_supervise_unlink.c src/include/s6/s6-supervise.h -src/libs6/s6_svc_ok.o src/libs6/s6_svc_ok.lo: src/libs6/s6_svc_ok.c src/include/s6/s6-supervise.h -src/libs6/s6_svc_write.o src/libs6/s6_svc_write.lo: src/libs6/s6_svc_write.c src/include/s6/s6-supervise.h -src/libs6/s6_svc_writectl.o src/libs6/s6_svc_writectl.lo: src/libs6/s6_svc_writectl.c src/include/s6/s6-supervise.h -src/libs6/s6_svstatus_pack.o src/libs6/s6_svstatus_pack.lo: src/libs6/s6_svstatus_pack.c src/include/s6/s6-supervise.h -src/libs6/s6_svstatus_read.o src/libs6/s6_svstatus_read.lo: src/libs6/s6_svstatus_read.c src/include/s6/s6-supervise.h -src/libs6/s6_svstatus_unpack.o src/libs6/s6_svstatus_unpack.lo: src/libs6/s6_svstatus_unpack.c src/include/s6/s6-supervise.h -src/libs6/s6_svstatus_write.o src/libs6/s6_svstatus_write.lo: src/libs6/s6_svstatus_write.c src/include/s6/s6-supervise.h -src/libs6/s6lock_acquire.o src/libs6/s6lock_acquire.lo: src/libs6/s6lock_acquire.c src/include/s6/s6lock.h -src/libs6/s6lock_check.o src/libs6/s6lock_check.lo: src/libs6/s6lock_check.c src/include/s6/s6lock.h -src/libs6/s6lock_end.o src/libs6/s6lock_end.lo: src/libs6/s6lock_end.c src/include/s6/s6lock.h -src/libs6/s6lock_release.o src/libs6/s6lock_release.lo: src/libs6/s6lock_release.c src/include/s6/s6lock.h -src/libs6/s6lock_start.o src/libs6/s6lock_start.lo: src/libs6/s6lock_start.c src/include/s6/s6lock.h -src/libs6/s6lock_startf.o src/libs6/s6lock_startf.lo: src/libs6/s6lock_startf.c src/include/s6/s6lock.h -src/libs6/s6lock_update.o src/libs6/s6lock_update.lo: src/libs6/s6lock_update.c src/include/s6/s6lock.h -src/libs6/s6lock_wait_and.o src/libs6/s6lock_wait_and.lo: src/libs6/s6lock_wait_and.c src/include/s6/s6lock.h -src/libs6/s6lock_wait_or.o src/libs6/s6lock_wait_or.lo: src/libs6/s6lock_wait_or.c src/include/s6/s6lock.h -src/libs6/s6lock_zero.o src/libs6/s6lock_zero.lo: src/libs6/s6lock_zero.c src/include/s6/s6lock.h +src/libs6/s6_dtally_pack.o src/libs6/s6_dtally_pack.lo: src/libs6/s6_dtally_pack.c src/include/s6/supervise.h +src/libs6/s6_dtally_read.o src/libs6/s6_dtally_read.lo: src/libs6/s6_dtally_read.c src/include/s6/supervise.h +src/libs6/s6_dtally_unpack.o src/libs6/s6_dtally_unpack.lo: src/libs6/s6_dtally_unpack.c src/include/s6/supervise.h +src/libs6/s6_dtally_write.o src/libs6/s6_dtally_write.lo: src/libs6/s6_dtally_write.c src/include/s6/supervise.h +src/libs6/s6_fdholder_delete.o src/libs6/s6_fdholder_delete.lo: src/libs6/s6_fdholder_delete.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_delete_async.o src/libs6/s6_fdholder_delete_async.lo: src/libs6/s6_fdholder_delete_async.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_end.o src/libs6/s6_fdholder_end.lo: src/libs6/s6_fdholder_end.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_getdump.o src/libs6/s6_fdholder_getdump.lo: src/libs6/s6_fdholder_getdump.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_list.o src/libs6/s6_fdholder_list.lo: src/libs6/s6_fdholder_list.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_list_async.o src/libs6/s6_fdholder_list_async.lo: src/libs6/s6_fdholder_list_async.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_list_cb.o src/libs6/s6_fdholder_list_cb.lo: src/libs6/s6_fdholder_list_cb.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_retrieve.o src/libs6/s6_fdholder_retrieve.lo: src/libs6/s6_fdholder_retrieve.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_retrieve_async.o src/libs6/s6_fdholder_retrieve_async.lo: src/libs6/s6_fdholder_retrieve_async.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_retrieve_cb.o src/libs6/s6_fdholder_retrieve_cb.lo: src/libs6/s6_fdholder_retrieve_cb.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_setdump.o src/libs6/s6_fdholder_setdump.lo: src/libs6/s6_fdholder_setdump.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_start.o src/libs6/s6_fdholder_start.lo: src/libs6/s6_fdholder_start.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_store.o src/libs6/s6_fdholder_store.lo: src/libs6/s6_fdholder_store.c src/include/s6/fdholder.h +src/libs6/s6_fdholder_store_async.o src/libs6/s6_fdholder_store_async.lo: src/libs6/s6_fdholder_store_async.c src/include/s6/fdholder.h +src/libs6/s6_supervise_link.o src/libs6/s6_supervise_link.lo: src/libs6/s6_supervise_link.c src/include/s6/supervise.h +src/libs6/s6_supervise_link_names.o src/libs6/s6_supervise_link_names.lo: src/libs6/s6_supervise_link_names.c src/include/s6/ftrigr.h src/include/s6/ftrigw.h src/include/s6/supervise.h +src/libs6/s6_supervise_unlink.o src/libs6/s6_supervise_unlink.lo: src/libs6/s6_supervise_unlink.c src/include/s6/supervise.h +src/libs6/s6_supervise_unlink_names.o src/libs6/s6_supervise_unlink_names.lo: src/libs6/s6_supervise_unlink_names.c src/include/s6/ftrigr.h src/include/s6/supervise.h +src/libs6/s6_svc_ok.o src/libs6/s6_svc_ok.lo: src/libs6/s6_svc_ok.c src/include/s6/supervise.h +src/libs6/s6_svc_write.o src/libs6/s6_svc_write.lo: src/libs6/s6_svc_write.c src/include/s6/supervise.h +src/libs6/s6_svc_writectl.o src/libs6/s6_svc_writectl.lo: src/libs6/s6_svc_writectl.c src/include/s6/supervise.h +src/libs6/s6_svstatus_pack.o src/libs6/s6_svstatus_pack.lo: src/libs6/s6_svstatus_pack.c src/include/s6/supervise.h +src/libs6/s6_svstatus_read.o src/libs6/s6_svstatus_read.lo: src/libs6/s6_svstatus_read.c src/include/s6/supervise.h +src/libs6/s6_svstatus_unpack.o src/libs6/s6_svstatus_unpack.lo: src/libs6/s6_svstatus_unpack.c src/include/s6/supervise.h +src/libs6/s6_svstatus_write.o src/libs6/s6_svstatus_write.lo: src/libs6/s6_svstatus_write.c src/include/s6/supervise.h +src/libs6/s6lock_acquire.o src/libs6/s6lock_acquire.lo: src/libs6/s6lock_acquire.c src/include/s6/lock.h +src/libs6/s6lock_check.o src/libs6/s6lock_check.lo: src/libs6/s6lock_check.c src/include/s6/lock.h +src/libs6/s6lock_end.o src/libs6/s6lock_end.lo: src/libs6/s6lock_end.c src/include/s6/lock.h +src/libs6/s6lock_release.o src/libs6/s6lock_release.lo: src/libs6/s6lock_release.c src/include/s6/lock.h +src/libs6/s6lock_start.o src/libs6/s6lock_start.lo: src/libs6/s6lock_start.c src/include/s6/lock.h +src/libs6/s6lock_startf.o src/libs6/s6lock_startf.lo: src/libs6/s6lock_startf.c src/include/s6/lock.h +src/libs6/s6lock_update.o src/libs6/s6lock_update.lo: src/libs6/s6lock_update.c src/include/s6/lock.h +src/libs6/s6lock_wait_and.o src/libs6/s6lock_wait_and.lo: src/libs6/s6lock_wait_and.c src/include/s6/lock.h +src/libs6/s6lock_wait_or.o src/libs6/s6lock_wait_or.lo: src/libs6/s6lock_wait_or.c src/include/s6/lock.h +src/libs6/s6lock_zero.o src/libs6/s6lock_zero.lo: src/libs6/s6lock_zero.c src/include/s6/lock.h src/libs6/s6lockd-helper.o src/libs6/s6lockd-helper.lo: src/libs6/s6lockd-helper.c src/include-local/s6lockd.h -src/libs6/s6lockd.o src/libs6/s6lockd.lo: src/libs6/s6lockd.c src/include/s6/s6lock.h +src/libs6/s6lockd.o src/libs6/s6lockd.lo: src/libs6/s6lockd.c src/include/s6/lock.h src/libs6/s6lockd_openandlock.o src/libs6/s6lockd_openandlock.lo: src/libs6/s6lockd_openandlock.c src/include-local/s6lockd.h src/pipe-tools/s6-cleanfifodir.o src/pipe-tools/s6-cleanfifodir.lo: src/pipe-tools/s6-cleanfifodir.c src/include/s6/ftrigw.h src/pipe-tools/s6-ftrig-listen.o src/pipe-tools/s6-ftrig-listen.lo: src/pipe-tools/s6-ftrig-listen.c src/include/s6/compat.h src/include/s6/ftrigr.h @@ -122,22 +123,22 @@ src/pipe-tools/s6-ftrig-notify.o src/pipe-tools/s6-ftrig-notify.lo: src/pipe-too src/pipe-tools/s6-ftrig-wait.o src/pipe-tools/s6-ftrig-wait.lo: src/pipe-tools/s6-ftrig-wait.c src/include/s6/ftrigr.h src/pipe-tools/s6-mkfifodir.o src/pipe-tools/s6-mkfifodir.lo: src/pipe-tools/s6-mkfifodir.c src/include/s6/ftrigw.h src/supervision/s6-notifyoncheck.o src/supervision/s6-notifyoncheck.lo: src/supervision/s6-notifyoncheck.c src/include/s6/s6.h -src/supervision/s6-permafailon.o src/supervision/s6-permafailon.lo: src/supervision/s6-permafailon.c src/include/s6/s6-supervise.h -src/supervision/s6-supervise.o src/supervision/s6-supervise.lo: src/supervision/s6-supervise.c src/include/s6/ftrigw.h src/include/s6/s6-supervise.h -src/supervision/s6-svc.o src/supervision/s6-svc.lo: src/supervision/s6-svc.c src/include/s6/config.h src/include/s6/s6-supervise.h -src/supervision/s6-svdir-link.o src/supervision/s6-svdir-link.lo: src/supervision/s6-svdir-link.c src/include/s6/s6-supervise.h -src/supervision/s6-svdir-unlink.o src/supervision/s6-svdir-unlink.lo: src/supervision/s6-svdir-unlink.c src/include/s6/s6-supervise.h -src/supervision/s6-svdt-clear.o src/supervision/s6-svdt-clear.lo: src/supervision/s6-svdt-clear.c src/include/s6/s6-supervise.h -src/supervision/s6-svdt.o src/supervision/s6-svdt.lo: src/supervision/s6-svdt.c src/include/s6/s6-supervise.h +src/supervision/s6-permafailon.o src/supervision/s6-permafailon.lo: src/supervision/s6-permafailon.c src/include/s6/supervise.h +src/supervision/s6-supervise.o src/supervision/s6-supervise.lo: src/supervision/s6-supervise.c src/include/s6/ftrigw.h src/include/s6/supervise.h +src/supervision/s6-svc.o src/supervision/s6-svc.lo: src/supervision/s6-svc.c src/include/s6/config.h src/include/s6/supervise.h +src/supervision/s6-svdt-clear.o src/supervision/s6-svdt-clear.lo: src/supervision/s6-svdt-clear.c src/include/s6/supervise.h +src/supervision/s6-svdt.o src/supervision/s6-svdt.lo: src/supervision/s6-svdt.c src/include/s6/supervise.h +src/supervision/s6-svlink.o src/supervision/s6-svlink.lo: src/supervision/s6-svlink.c src/include/s6/supervise.h src/supervision/s6-svlisten.o src/supervision/s6-svlisten.lo: src/supervision/s6-svlisten.c src/supervision/s6-svlisten.h src/include/s6/compat.h src/supervision/s6-svlisten1.o src/supervision/s6-svlisten1.lo: src/supervision/s6-svlisten1.c src/supervision/s6-svlisten.h -src/supervision/s6-svok.o src/supervision/s6-svok.lo: src/supervision/s6-svok.c src/include/s6/s6-supervise.h -src/supervision/s6-svperms.o src/supervision/s6-svperms.lo: src/supervision/s6-svperms.c src/include/s6/s6-supervise.h -src/supervision/s6-svscan.o src/supervision/s6-svscan.lo: src/supervision/s6-svscan.c src/include/s6/config.h src/include/s6/s6-supervise.h -src/supervision/s6-svscanctl.o src/supervision/s6-svscanctl.lo: src/supervision/s6-svscanctl.c src/include/s6/s6-supervise.h -src/supervision/s6-svstat.o src/supervision/s6-svstat.lo: src/supervision/s6-svstat.c src/include/s6/s6-supervise.h +src/supervision/s6-svok.o src/supervision/s6-svok.lo: src/supervision/s6-svok.c src/include/s6/supervise.h +src/supervision/s6-svperms.o src/supervision/s6-svperms.lo: src/supervision/s6-svperms.c src/include/s6/supervise.h +src/supervision/s6-svscan.o src/supervision/s6-svscan.lo: src/supervision/s6-svscan.c src/include/s6/config.h src/include/s6/supervise.h +src/supervision/s6-svscanctl.o src/supervision/s6-svscanctl.lo: src/supervision/s6-svscanctl.c src/include/s6/supervise.h +src/supervision/s6-svstat.o src/supervision/s6-svstat.lo: src/supervision/s6-svstat.c src/include/s6/supervise.h +src/supervision/s6-svunlink.o src/supervision/s6-svunlink.lo: src/supervision/s6-svunlink.c src/include/s6/supervise.h src/supervision/s6-svwait.o src/supervision/s6-svwait.lo: src/supervision/s6-svwait.c src/supervision/s6-svlisten.h -src/supervision/s6_svlisten_loop.o src/supervision/s6_svlisten_loop.lo: src/supervision/s6_svlisten_loop.c src/supervision/s6-svlisten.h src/include/s6/ftrigr.h src/include/s6/s6-supervise.h +src/supervision/s6_svlisten_loop.o src/supervision/s6_svlisten_loop.lo: src/supervision/s6_svlisten_loop.c src/supervision/s6-svlisten.h src/include/s6/ftrigr.h src/include/s6/supervise.h src/supervision/s6_svlisten_signal_handler.o src/supervision/s6_svlisten_signal_handler.lo: src/supervision/s6_svlisten_signal_handler.c src/supervision/s6-svlisten.h src/usertree/s6-usertree-maker.o src/usertree/s6-usertree-maker.lo: src/usertree/s6-usertree-maker.c src/include/s6/config.h @@ -210,12 +211,12 @@ s6-fdholder-transferdump: src/fdholder/s6-fdholder-transferdump.o ${LIBS6} s6-fdholderd: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} s6-fdholderd: src/fdholder/s6-fdholderd.o ${LIBS6} ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),) -libs6.a.xyzzy: src/libs6/ftrigr1_zero.o src/libs6/ftrigr_check.o src/libs6/ftrigr_checksa.o src/libs6/ftrigr_ack.o src/libs6/ftrigr_end.o src/libs6/ftrigr_start.o src/libs6/ftrigr_startf.o src/libs6/ftrigr_subscribe.o src/libs6/ftrigr_unsubscribe.o src/libs6/ftrigr_update.o src/libs6/ftrigr_updateb.o src/libs6/ftrigr_wait_and.o src/libs6/ftrigr_wait_or.o src/libs6/ftrigr_zero.o src/libs6/ftrigw_clean.o src/libs6/ftrigw_fifodir_make.o src/libs6/ftrigw_notify.o src/libs6/ftrigw_notifyb.o src/libs6/ftrigw_notifyb_nosig.o src/libs6/s6_accessrules_backend_cdb.o src/libs6/s6_accessrules_backend_fs.o src/libs6/s6_accessrules_keycheck_ip4.o src/libs6/s6_accessrules_keycheck_ip6.o src/libs6/s6_accessrules_keycheck_reversedns.o src/libs6/s6_accessrules_keycheck_uidgid.o src/libs6/s6_accessrules_params_free.o src/libs6/s6_accessrules_uidgid_cdb.o src/libs6/s6_accessrules_uidgid_fs.o src/libs6/s6_compat_el_semicolon.o src/libs6/s6_dtally_pack.o src/libs6/s6_dtally_unpack.o src/libs6/s6_dtally_read.o src/libs6/s6_dtally_write.o src/libs6/s6_svc_ok.o src/libs6/s6_svc_write.o src/libs6/s6_svc_writectl.o src/libs6/s6_svstatus_pack.o src/libs6/s6_svstatus_read.o src/libs6/s6_svstatus_unpack.o src/libs6/s6_svstatus_write.o src/libs6/s6lock_acquire.o src/libs6/s6lock_check.o src/libs6/s6lock_end.o src/libs6/s6lock_release.o src/libs6/s6lock_start.o src/libs6/s6lock_startf.o src/libs6/s6lock_update.o src/libs6/s6lock_wait_and.o src/libs6/s6lock_wait_or.o src/libs6/s6lock_zero.o src/libs6/s6_fdholder_delete.o src/libs6/s6_fdholder_delete_async.o src/libs6/s6_fdholder_end.o src/libs6/s6_fdholder_getdump.o src/libs6/s6_fdholder_list.o src/libs6/s6_fdholder_list_async.o src/libs6/s6_fdholder_list_cb.o src/libs6/s6_fdholder_retrieve.o src/libs6/s6_fdholder_retrieve_async.o src/libs6/s6_fdholder_retrieve_cb.o src/libs6/s6_fdholder_setdump.o src/libs6/s6_fdholder_start.o src/libs6/s6_fdholder_store.o src/libs6/s6_fdholder_store_async.o src/libs6/s6_supervise_link.o src/libs6/s6_supervise_link_names.o src/libs6/s6_supervise_unlink.o +libs6.a.xyzzy: src/libs6/ftrigr1_zero.o src/libs6/ftrigr_check.o src/libs6/ftrigr_checksa.o src/libs6/ftrigr_ack.o src/libs6/ftrigr_end.o src/libs6/ftrigr_start.o src/libs6/ftrigr_startf.o src/libs6/ftrigr_subscribe.o src/libs6/ftrigr_unsubscribe.o src/libs6/ftrigr_update.o src/libs6/ftrigr_updateb.o src/libs6/ftrigr_wait_and.o src/libs6/ftrigr_wait_or.o src/libs6/ftrigr_zero.o src/libs6/ftrigw_clean.o src/libs6/ftrigw_fifodir_make.o src/libs6/ftrigw_notify.o src/libs6/ftrigw_notifyb.o src/libs6/ftrigw_notifyb_nosig.o src/libs6/s6_accessrules_backend_cdb.o src/libs6/s6_accessrules_backend_fs.o src/libs6/s6_accessrules_keycheck_ip4.o src/libs6/s6_accessrules_keycheck_ip6.o src/libs6/s6_accessrules_keycheck_reversedns.o src/libs6/s6_accessrules_keycheck_uidgid.o src/libs6/s6_accessrules_params_free.o src/libs6/s6_accessrules_uidgid_cdb.o src/libs6/s6_accessrules_uidgid_fs.o src/libs6/s6_compat_el_semicolon.o src/libs6/s6_dtally_pack.o src/libs6/s6_dtally_unpack.o src/libs6/s6_dtally_read.o src/libs6/s6_dtally_write.o src/libs6/s6_svc_ok.o src/libs6/s6_svc_write.o src/libs6/s6_svc_writectl.o src/libs6/s6_svstatus_pack.o src/libs6/s6_svstatus_read.o src/libs6/s6_svstatus_unpack.o src/libs6/s6_svstatus_write.o src/libs6/s6lock_acquire.o src/libs6/s6lock_check.o src/libs6/s6lock_end.o src/libs6/s6lock_release.o src/libs6/s6lock_start.o src/libs6/s6lock_startf.o src/libs6/s6lock_update.o src/libs6/s6lock_wait_and.o src/libs6/s6lock_wait_or.o src/libs6/s6lock_zero.o src/libs6/s6_fdholder_delete.o src/libs6/s6_fdholder_delete_async.o src/libs6/s6_fdholder_end.o src/libs6/s6_fdholder_getdump.o src/libs6/s6_fdholder_list.o src/libs6/s6_fdholder_list_async.o src/libs6/s6_fdholder_list_cb.o src/libs6/s6_fdholder_retrieve.o src/libs6/s6_fdholder_retrieve_async.o src/libs6/s6_fdholder_retrieve_cb.o src/libs6/s6_fdholder_setdump.o src/libs6/s6_fdholder_start.o src/libs6/s6_fdholder_store.o src/libs6/s6_fdholder_store_async.o src/libs6/s6_supervise_link.o src/libs6/s6_supervise_link_names.o src/libs6/s6_supervise_unlink.o src/libs6/s6_supervise_unlink_names.o else -libs6.a.xyzzy: src/libs6/ftrigr1_zero.lo src/libs6/ftrigr_check.lo src/libs6/ftrigr_checksa.lo src/libs6/ftrigr_ack.lo src/libs6/ftrigr_end.lo src/libs6/ftrigr_start.lo src/libs6/ftrigr_startf.lo src/libs6/ftrigr_subscribe.lo src/libs6/ftrigr_unsubscribe.lo src/libs6/ftrigr_update.lo src/libs6/ftrigr_updateb.lo src/libs6/ftrigr_wait_and.lo src/libs6/ftrigr_wait_or.lo src/libs6/ftrigr_zero.lo src/libs6/ftrigw_clean.lo src/libs6/ftrigw_fifodir_make.lo src/libs6/ftrigw_notify.lo src/libs6/ftrigw_notifyb.lo src/libs6/ftrigw_notifyb_nosig.lo src/libs6/s6_accessrules_backend_cdb.lo src/libs6/s6_accessrules_backend_fs.lo src/libs6/s6_accessrules_keycheck_ip4.lo src/libs6/s6_accessrules_keycheck_ip6.lo src/libs6/s6_accessrules_keycheck_reversedns.lo src/libs6/s6_accessrules_keycheck_uidgid.lo src/libs6/s6_accessrules_params_free.lo src/libs6/s6_accessrules_uidgid_cdb.lo src/libs6/s6_accessrules_uidgid_fs.lo src/libs6/s6_compat_el_semicolon.lo src/libs6/s6_dtally_pack.lo src/libs6/s6_dtally_unpack.lo src/libs6/s6_dtally_read.lo src/libs6/s6_dtally_write.lo src/libs6/s6_svc_ok.lo src/libs6/s6_svc_write.lo src/libs6/s6_svc_writectl.lo src/libs6/s6_svstatus_pack.lo src/libs6/s6_svstatus_read.lo src/libs6/s6_svstatus_unpack.lo src/libs6/s6_svstatus_write.lo src/libs6/s6lock_acquire.lo src/libs6/s6lock_check.lo src/libs6/s6lock_end.lo src/libs6/s6lock_release.lo src/libs6/s6lock_start.lo src/libs6/s6lock_startf.lo src/libs6/s6lock_update.lo src/libs6/s6lock_wait_and.lo src/libs6/s6lock_wait_or.lo src/libs6/s6lock_zero.lo src/libs6/s6_fdholder_delete.lo src/libs6/s6_fdholder_delete_async.lo src/libs6/s6_fdholder_end.lo src/libs6/s6_fdholder_getdump.lo src/libs6/s6_fdholder_list.lo src/libs6/s6_fdholder_list_async.lo src/libs6/s6_fdholder_list_cb.lo src/libs6/s6_fdholder_retrieve.lo src/libs6/s6_fdholder_retrieve_async.lo src/libs6/s6_fdholder_retrieve_cb.lo src/libs6/s6_fdholder_setdump.lo src/libs6/s6_fdholder_start.lo src/libs6/s6_fdholder_store.lo src/libs6/s6_fdholder_store_async.lo src/libs6/s6_supervise_link.lo src/libs6/s6_supervise_link_names.lo src/libs6/s6_supervise_unlink.lo +libs6.a.xyzzy: src/libs6/ftrigr1_zero.lo src/libs6/ftrigr_check.lo src/libs6/ftrigr_checksa.lo src/libs6/ftrigr_ack.lo src/libs6/ftrigr_end.lo src/libs6/ftrigr_start.lo src/libs6/ftrigr_startf.lo src/libs6/ftrigr_subscribe.lo src/libs6/ftrigr_unsubscribe.lo src/libs6/ftrigr_update.lo src/libs6/ftrigr_updateb.lo src/libs6/ftrigr_wait_and.lo src/libs6/ftrigr_wait_or.lo src/libs6/ftrigr_zero.lo src/libs6/ftrigw_clean.lo src/libs6/ftrigw_fifodir_make.lo src/libs6/ftrigw_notify.lo src/libs6/ftrigw_notifyb.lo src/libs6/ftrigw_notifyb_nosig.lo src/libs6/s6_accessrules_backend_cdb.lo src/libs6/s6_accessrules_backend_fs.lo src/libs6/s6_accessrules_keycheck_ip4.lo src/libs6/s6_accessrules_keycheck_ip6.lo src/libs6/s6_accessrules_keycheck_reversedns.lo src/libs6/s6_accessrules_keycheck_uidgid.lo src/libs6/s6_accessrules_params_free.lo src/libs6/s6_accessrules_uidgid_cdb.lo src/libs6/s6_accessrules_uidgid_fs.lo src/libs6/s6_compat_el_semicolon.lo src/libs6/s6_dtally_pack.lo src/libs6/s6_dtally_unpack.lo src/libs6/s6_dtally_read.lo src/libs6/s6_dtally_write.lo src/libs6/s6_svc_ok.lo src/libs6/s6_svc_write.lo src/libs6/s6_svc_writectl.lo src/libs6/s6_svstatus_pack.lo src/libs6/s6_svstatus_read.lo src/libs6/s6_svstatus_unpack.lo src/libs6/s6_svstatus_write.lo src/libs6/s6lock_acquire.lo src/libs6/s6lock_check.lo src/libs6/s6lock_end.lo src/libs6/s6lock_release.lo src/libs6/s6lock_start.lo src/libs6/s6lock_startf.lo src/libs6/s6lock_update.lo src/libs6/s6lock_wait_and.lo src/libs6/s6lock_wait_or.lo src/libs6/s6lock_zero.lo src/libs6/s6_fdholder_delete.lo src/libs6/s6_fdholder_delete_async.lo src/libs6/s6_fdholder_end.lo src/libs6/s6_fdholder_getdump.lo src/libs6/s6_fdholder_list.lo src/libs6/s6_fdholder_list_async.lo src/libs6/s6_fdholder_list_cb.lo src/libs6/s6_fdholder_retrieve.lo src/libs6/s6_fdholder_retrieve_async.lo src/libs6/s6_fdholder_retrieve_cb.lo src/libs6/s6_fdholder_setdump.lo src/libs6/s6_fdholder_start.lo src/libs6/s6_fdholder_store.lo src/libs6/s6_fdholder_store_async.lo src/libs6/s6_supervise_link.lo src/libs6/s6_supervise_link_names.lo src/libs6/s6_supervise_unlink.lo src/libs6/s6_supervise_unlink_names.lo endif libs6.so.xyzzy: EXTRA_LIBS := -lskarnet -libs6.so.xyzzy: src/libs6/ftrigr1_zero.lo src/libs6/ftrigr_check.lo src/libs6/ftrigr_checksa.lo src/libs6/ftrigr_ack.lo src/libs6/ftrigr_end.lo src/libs6/ftrigr_start.lo src/libs6/ftrigr_startf.lo src/libs6/ftrigr_subscribe.lo src/libs6/ftrigr_unsubscribe.lo src/libs6/ftrigr_update.lo src/libs6/ftrigr_updateb.lo src/libs6/ftrigr_wait_and.lo src/libs6/ftrigr_wait_or.lo src/libs6/ftrigr_zero.lo src/libs6/ftrigw_clean.lo src/libs6/ftrigw_fifodir_make.lo src/libs6/ftrigw_notify.lo src/libs6/ftrigw_notifyb.lo src/libs6/ftrigw_notifyb_nosig.lo src/libs6/s6_accessrules_backend_cdb.lo src/libs6/s6_accessrules_backend_fs.lo src/libs6/s6_accessrules_keycheck_ip4.lo src/libs6/s6_accessrules_keycheck_ip6.lo src/libs6/s6_accessrules_keycheck_reversedns.lo src/libs6/s6_accessrules_keycheck_uidgid.lo src/libs6/s6_accessrules_params_free.lo src/libs6/s6_accessrules_uidgid_cdb.lo src/libs6/s6_accessrules_uidgid_fs.lo src/libs6/s6_compat_el_semicolon.lo src/libs6/s6_dtally_pack.lo src/libs6/s6_dtally_unpack.lo src/libs6/s6_dtally_read.lo src/libs6/s6_dtally_write.lo src/libs6/s6_svc_ok.lo src/libs6/s6_svc_write.lo src/libs6/s6_svc_writectl.lo src/libs6/s6_svstatus_pack.lo src/libs6/s6_svstatus_read.lo src/libs6/s6_svstatus_unpack.lo src/libs6/s6_svstatus_write.lo src/libs6/s6lock_acquire.lo src/libs6/s6lock_check.lo src/libs6/s6lock_end.lo src/libs6/s6lock_release.lo src/libs6/s6lock_start.lo src/libs6/s6lock_startf.lo src/libs6/s6lock_update.lo src/libs6/s6lock_wait_and.lo src/libs6/s6lock_wait_or.lo src/libs6/s6lock_zero.lo src/libs6/s6_fdholder_delete.lo src/libs6/s6_fdholder_delete_async.lo src/libs6/s6_fdholder_end.lo src/libs6/s6_fdholder_getdump.lo src/libs6/s6_fdholder_list.lo src/libs6/s6_fdholder_list_async.lo src/libs6/s6_fdholder_list_cb.lo src/libs6/s6_fdholder_retrieve.lo src/libs6/s6_fdholder_retrieve_async.lo src/libs6/s6_fdholder_retrieve_cb.lo src/libs6/s6_fdholder_setdump.lo src/libs6/s6_fdholder_start.lo src/libs6/s6_fdholder_store.lo src/libs6/s6_fdholder_store_async.lo src/libs6/s6_supervise_link.lo src/libs6/s6_supervise_link_names.lo src/libs6/s6_supervise_unlink.lo +libs6.so.xyzzy: src/libs6/ftrigr1_zero.lo src/libs6/ftrigr_check.lo src/libs6/ftrigr_checksa.lo src/libs6/ftrigr_ack.lo src/libs6/ftrigr_end.lo src/libs6/ftrigr_start.lo src/libs6/ftrigr_startf.lo src/libs6/ftrigr_subscribe.lo src/libs6/ftrigr_unsubscribe.lo src/libs6/ftrigr_update.lo src/libs6/ftrigr_updateb.lo src/libs6/ftrigr_wait_and.lo src/libs6/ftrigr_wait_or.lo src/libs6/ftrigr_zero.lo src/libs6/ftrigw_clean.lo src/libs6/ftrigw_fifodir_make.lo src/libs6/ftrigw_notify.lo src/libs6/ftrigw_notifyb.lo src/libs6/ftrigw_notifyb_nosig.lo src/libs6/s6_accessrules_backend_cdb.lo src/libs6/s6_accessrules_backend_fs.lo src/libs6/s6_accessrules_keycheck_ip4.lo src/libs6/s6_accessrules_keycheck_ip6.lo src/libs6/s6_accessrules_keycheck_reversedns.lo src/libs6/s6_accessrules_keycheck_uidgid.lo src/libs6/s6_accessrules_params_free.lo src/libs6/s6_accessrules_uidgid_cdb.lo src/libs6/s6_accessrules_uidgid_fs.lo src/libs6/s6_compat_el_semicolon.lo src/libs6/s6_dtally_pack.lo src/libs6/s6_dtally_unpack.lo src/libs6/s6_dtally_read.lo src/libs6/s6_dtally_write.lo src/libs6/s6_svc_ok.lo src/libs6/s6_svc_write.lo src/libs6/s6_svc_writectl.lo src/libs6/s6_svstatus_pack.lo src/libs6/s6_svstatus_read.lo src/libs6/s6_svstatus_unpack.lo src/libs6/s6_svstatus_write.lo src/libs6/s6lock_acquire.lo src/libs6/s6lock_check.lo src/libs6/s6lock_end.lo src/libs6/s6lock_release.lo src/libs6/s6lock_start.lo src/libs6/s6lock_startf.lo src/libs6/s6lock_update.lo src/libs6/s6lock_wait_and.lo src/libs6/s6lock_wait_or.lo src/libs6/s6lock_zero.lo src/libs6/s6_fdholder_delete.lo src/libs6/s6_fdholder_delete_async.lo src/libs6/s6_fdholder_end.lo src/libs6/s6_fdholder_getdump.lo src/libs6/s6_fdholder_list.lo src/libs6/s6_fdholder_list_async.lo src/libs6/s6_fdholder_list_cb.lo src/libs6/s6_fdholder_retrieve.lo src/libs6/s6_fdholder_retrieve_async.lo src/libs6/s6_fdholder_retrieve_cb.lo src/libs6/s6_fdholder_setdump.lo src/libs6/s6_fdholder_start.lo src/libs6/s6_fdholder_store.lo src/libs6/s6_fdholder_store_async.lo src/libs6/s6_supervise_link.lo src/libs6/s6_supervise_link_names.lo src/libs6/s6_supervise_unlink.lo src/libs6/s6_supervise_unlink_names.lo ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),) libs6lockd.a.xyzzy: src/libs6/s6lockd_openandlock.o else @@ -247,14 +248,12 @@ s6-supervise: EXTRA_LIBS := -lskarnet ${SYSCLOCK_LIB} s6-supervise: src/supervision/s6-supervise.o libs6.a.xyzzy s6-svc: EXTRA_LIBS := -lskarnet s6-svc: src/supervision/s6-svc.o ${LIBS6} -s6-svdir-link: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} ${SPAWN_LIB} -s6-svdir-link: src/supervision/s6-svdir-link.o ${LIBS6} -s6-svdir-unlink: EXTRA_LIBS := -lskarnet -s6-svdir-unlink: src/supervision/s6-svdir-unlink.o ${LIBS6} s6-svdt: EXTRA_LIBS := -lskarnet s6-svdt: src/supervision/s6-svdt.o ${LIBS6} s6-svdt-clear: EXTRA_LIBS := -lskarnet s6-svdt-clear: src/supervision/s6-svdt-clear.o ${LIBS6} +s6-svlink: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} ${SPAWN_LIB} +s6-svlink: src/supervision/s6-svlink.o ${LIBS6} s6-svlisten: EXTRA_LIBS := ${EXECLINE_LIB} -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} ${SPAWN_LIB} s6-svlisten: src/supervision/s6-svlisten.o src/supervision/s6_svlisten_signal_handler.o src/supervision/s6_svlisten_loop.o ${LIBS6} s6-svlisten1: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} ${SPAWN_LIB} @@ -269,6 +268,8 @@ s6-svscanctl: EXTRA_LIBS := -lskarnet s6-svscanctl: src/supervision/s6-svscanctl.o ${LIBS6} s6-svstat: EXTRA_LIBS := -lskarnet ${SYSCLOCK_LIB} s6-svstat: src/supervision/s6-svstat.o ${LIBS6} +s6-svunlink: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} ${SPAWN_LIB} +s6-svunlink: src/supervision/s6-svunlink.o ${LIBS6} s6-svwait: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} ${SPAWN_LIB} s6-svwait: src/supervision/s6-svwait.o src/supervision/s6_svlisten_loop.o ${LIBS6} s6-usertree-maker: EXTRA_LIBS := -lskarnet diff --git a/package/targets.mak b/package/targets.mak index 5516cf9..4208b12 100644 --- a/package/targets.mak +++ b/package/targets.mak @@ -11,8 +11,6 @@ s6-mkfifodir \ s6-svscan \ s6-supervise \ s6-svc \ -s6-svdir-link \ -s6-svdir-unlink \ s6-svscanctl \ s6-svok \ s6-svstat \ @@ -23,6 +21,8 @@ s6-svwait \ s6-svlisten1 \ s6-svlisten \ s6-svperms \ +s6-svlink \ +s6-svunlink \ s6-notifyoncheck \ s6-envdir \ s6-envuidgid \ diff --git a/src/fdholder/s6-fdholder-delete.c b/src/fdholder/s6-fdholder-delete.c index 8d11b1e..ac0c9e7 100644 --- a/src/fdholder/s6-fdholder-delete.c +++ b/src/fdholder/s6-fdholder-delete.c @@ -4,7 +4,7 @@ #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> #include <skalibs/tai.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #define USAGE "s6-fdholder-delete [ -t timeout ] socket id" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/fdholder/s6-fdholder-getdump.c b/src/fdholder/s6-fdholder-getdump.c index 789f478..69781c3 100644 --- a/src/fdholder/s6-fdholder-getdump.c +++ b/src/fdholder/s6-fdholder-getdump.c @@ -11,7 +11,7 @@ #include <skalibs/genalloc.h> #include <skalibs/exec.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #define USAGE "s6-fdholder-getdump [ -t timeout ] socket prog..." #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/fdholder/s6-fdholder-list.c b/src/fdholder/s6-fdholder-list.c index 930b50f..4f16af3 100644 --- a/src/fdholder/s6-fdholder-list.c +++ b/src/fdholder/s6-fdholder-list.c @@ -8,7 +8,7 @@ #include <skalibs/tai.h> #include <skalibs/stralloc.h> #include <skalibs/skamisc.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #define USAGE "s6-fdholder-list [ -t timeout ] socket" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/fdholder/s6-fdholder-retrieve.c b/src/fdholder/s6-fdholder-retrieve.c index d4206c9..0e8d224 100644 --- a/src/fdholder/s6-fdholder-retrieve.c +++ b/src/fdholder/s6-fdholder-retrieve.c @@ -7,7 +7,7 @@ #include <skalibs/djbunix.h> #include <skalibs/exec.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #define USAGE "s6-fdholder-retrieve [ -D ] [ -t timeout ] socket id prog..." #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/fdholder/s6-fdholder-setdump.c b/src/fdholder/s6-fdholder-setdump.c index 4a85291..1d36aba 100644 --- a/src/fdholder/s6-fdholder-setdump.c +++ b/src/fdholder/s6-fdholder-setdump.c @@ -6,7 +6,7 @@ #include <skalibs/strerr2.h> #include <skalibs/sgetopt.h> #include <skalibs/tai.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #define USAGE "s6-fdholder-setdump [ -t timeout ] socket" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/fdholder/s6-fdholder-store.c b/src/fdholder/s6-fdholder-store.c index 84aef3c..ff53034 100644 --- a/src/fdholder/s6-fdholder-store.c +++ b/src/fdholder/s6-fdholder-store.c @@ -4,7 +4,7 @@ #include <skalibs/strerr2.h> #include <skalibs/sgetopt.h> #include <skalibs/tai.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #define USAGE "s6-fdholder-store [ -d fd ] [ -t timeout ] [ -T fdtimeout ] socket id" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/fdholder/s6-fdholder-transferdump.c b/src/fdholder/s6-fdholder-transferdump.c index 035d103..3fa4790 100644 --- a/src/fdholder/s6-fdholder-transferdump.c +++ b/src/fdholder/s6-fdholder-transferdump.c @@ -5,7 +5,7 @@ #include <skalibs/sgetopt.h> #include <skalibs/tai.h> #include <skalibs/genalloc.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #define USAGE "s6-fdholder-transferdump [ -t timeoutfrom:timeoutto ] socketfrom socketto" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/fdholder/s6-fdholderd.c b/src/fdholder/s6-fdholderd.c index 87124e5..483c20a 100644 --- a/src/fdholder/s6-fdholderd.c +++ b/src/fdholder/s6-fdholderd.c @@ -32,7 +32,7 @@ #include <skalibs/unixconnection.h> #include <s6/accessrules.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #include <skalibs/posixishard.h> diff --git a/src/include/s6/s6-fdholder.h b/src/include/s6/fdholder.h index 62b9ab7..62b9ab7 100644 --- a/src/include/s6/s6-fdholder.h +++ b/src/include/s6/fdholder.h diff --git a/src/include/s6/s6lock.h b/src/include/s6/lock.h index b1848c7..e87e001 100644 --- a/src/include/s6/s6lock.h +++ b/src/include/s6/lock.h @@ -1,13 +1,15 @@ /* ISC license. */ -#ifndef S6LOCK_H -#define S6LOCK_H +#ifndef S6_LOCK_H +#define S6_LOCK_H #include <stdint.h> + #include <skalibs/tai.h> #include <skalibs/genalloc.h> #include <skalibs/gensetdyn.h> #include <skalibs/textclient.h> + #include <s6/config.h> diff --git a/src/include/s6/s6.h b/src/include/s6/s6.h index aabcc13..5b32a86 100644 --- a/src/include/s6/s6.h +++ b/src/include/s6/s6.h @@ -4,10 +4,10 @@ #define S6_H #include <s6/compat.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #include <s6/ftrigr.h> #include <s6/ftrigw.h> #include <s6/accessrules.h> -#include <s6/s6lock.h> +#include <s6/lock.h> #endif diff --git a/src/include/s6/s6-supervise.h b/src/include/s6/supervise.h index c0dc1b6..914bff3 100644 --- a/src/include/s6/s6-supervise.h +++ b/src/include/s6/supervise.h @@ -30,10 +30,8 @@ struct s6_svstatus_s int wstat ; unsigned int flagpaused : 1 ; unsigned int flagfinishing : 1 ; - unsigned int flagwant : 1 ; /* unused */ unsigned int flagwantup : 1 ; unsigned int flagready : 1 ; - unsigned int flagthrottled : 1 ; } ; #define S6_SVSTATUS_ZERO \ @@ -44,10 +42,8 @@ struct s6_svstatus_s .wstat = 0, \ .flagpaused = 0, \ .flagfinishing = 0, \ - .flagwant = 1, \ .flagwantup = 1, \ .flagready = 1, \ - .flagthrottled = 0 \ } extern void s6_svstatus_pack (char *, s6_svstatus_t const *) ; @@ -60,6 +56,8 @@ extern int s6_supervise_link (char const *, char const *const *, size_t, char co extern int s6_supervise_link_names (char const *, char const *const *, char const *const *, size_t, uint32_t, tain const *, tain *) ; #define s6_supervise_link_names_g(scdir, servicedirs, names, n, options, deadline) s6_supervise_link_names(scdir, servicedirs, names, n, options, (deadline), &STAMP) extern void s6_supervise_unlink (char const *, char const *, uint32_t) ; +extern int s6_supervise_unlink_names (char const *, char const *const *, size_t, uint32_t, tain const *, tain *) ; +#define s6_supervise_unlink_names_g(scdir, names, n, options, deadline) s6_supervise_unlink_names(scdir, names, n, options, (deadline), &STAMP) typedef struct s6_dtally_s s6_dtally_t, *s6_dtally_ref ; struct s6_dtally_s diff --git a/src/libs6/deps-lib/s6 b/src/libs6/deps-lib/s6 index 94eab87..17b6dc4 100644 --- a/src/libs6/deps-lib/s6 +++ b/src/libs6/deps-lib/s6 @@ -65,4 +65,5 @@ s6_fdholder_store_async.o s6_supervise_link.o s6_supervise_link_names.o s6_supervise_unlink.o +s6_supervise_unlink_names.o -lskarnet diff --git a/src/libs6/s6_dtally_pack.c b/src/libs6/s6_dtally_pack.c index 1608e78..47c26f4 100644 --- a/src/libs6/s6_dtally_pack.c +++ b/src/libs6/s6_dtally_pack.c @@ -1,7 +1,7 @@ /* ISC license. */ #include <skalibs/tai.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> void s6_dtally_pack (char *pack, s6_dtally_t const *d) { diff --git a/src/libs6/s6_dtally_read.c b/src/libs6/s6_dtally_read.c index 3906b93..a1623cc 100644 --- a/src/libs6/s6_dtally_read.c +++ b/src/libs6/s6_dtally_read.c @@ -7,7 +7,7 @@ #include <skalibs/allreadwrite.h> #include <skalibs/tai.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> static int truncit (char const *s) { diff --git a/src/libs6/s6_dtally_unpack.c b/src/libs6/s6_dtally_unpack.c index 8fca787..a82e5c3 100644 --- a/src/libs6/s6_dtally_unpack.c +++ b/src/libs6/s6_dtally_unpack.c @@ -1,7 +1,7 @@ /* ISC license. */ #include <skalibs/tai.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> void s6_dtally_unpack (char const *pack, s6_dtally_t *d) { diff --git a/src/libs6/s6_dtally_write.c b/src/libs6/s6_dtally_write.c index 785376a..766b66c 100644 --- a/src/libs6/s6_dtally_write.c +++ b/src/libs6/s6_dtally_write.c @@ -2,7 +2,7 @@ #include <string.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> int s6_dtally_write (char const *sv, s6_dtally_t const *tab, size_t n) { diff --git a/src/libs6/s6_fdholder_delete.c b/src/libs6/s6_fdholder_delete.c index 6f506dd..585722d 100644 --- a/src/libs6/s6_fdholder_delete.c +++ b/src/libs6/s6_fdholder_delete.c @@ -6,7 +6,7 @@ #include <skalibs/tai.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6_fdholder_delete_async.c b/src/libs6/s6_fdholder_delete_async.c index 2b14f47..50dc6f8 100644 --- a/src/libs6/s6_fdholder_delete_async.c +++ b/src/libs6/s6_fdholder_delete_async.c @@ -4,7 +4,7 @@ #include <string.h> #include <errno.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> int s6_fdholder_delete_async (s6_fdholder_t *a, char const *id) { diff --git a/src/libs6/s6_fdholder_end.c b/src/libs6/s6_fdholder_end.c index 7b2cb2d..dd8c312 100644 --- a/src/libs6/s6_fdholder_end.c +++ b/src/libs6/s6_fdholder_end.c @@ -2,7 +2,7 @@ #include <skalibs/djbunix.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> void s6_fdholder_end (s6_fdholder_t *a) { diff --git a/src/libs6/s6_fdholder_getdump.c b/src/libs6/s6_fdholder_getdump.c index 630ddc5..b24ed02 100644 --- a/src/libs6/s6_fdholder_getdump.c +++ b/src/libs6/s6_fdholder_getdump.c @@ -11,7 +11,7 @@ #include <skalibs/djbunix.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6_fdholder_list.c b/src/libs6/s6_fdholder_list.c index 312fc28..10d1f2c 100644 --- a/src/libs6/s6_fdholder_list.c +++ b/src/libs6/s6_fdholder_list.c @@ -5,7 +5,7 @@ #include <skalibs/error.h> #include <skalibs/tai.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> int s6_fdholder_list (s6_fdholder_t *a, stralloc *sa, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6_fdholder_list_async.c b/src/libs6/s6_fdholder_list_async.c index e7e8810..167a6f9 100644 --- a/src/libs6/s6_fdholder_list_async.c +++ b/src/libs6/s6_fdholder_list_async.c @@ -1,7 +1,7 @@ /* ISC license. */ #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> int s6_fdholder_list_async (s6_fdholder_t *a) { diff --git a/src/libs6/s6_fdholder_list_cb.c b/src/libs6/s6_fdholder_list_cb.c index 0be71c9..f1b8895 100644 --- a/src/libs6/s6_fdholder_list_cb.c +++ b/src/libs6/s6_fdholder_list_cb.c @@ -7,7 +7,7 @@ #include <skalibs/bytestr.h> #include <skalibs/stralloc.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6_fdholder_retrieve.c b/src/libs6/s6_fdholder_retrieve.c index 7af8eb4..6f56283 100644 --- a/src/libs6/s6_fdholder_retrieve.c +++ b/src/libs6/s6_fdholder_retrieve.c @@ -4,7 +4,7 @@ #include <skalibs/allreadwrite.h> #include <skalibs/tai.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> int s6_fdholder_retrieve_maybe_delete (s6_fdholder_t *a, char const *id, int dodelete, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6_fdholder_retrieve_async.c b/src/libs6/s6_fdholder_retrieve_async.c index ce190b8..da41aad 100644 --- a/src/libs6/s6_fdholder_retrieve_async.c +++ b/src/libs6/s6_fdholder_retrieve_async.c @@ -4,7 +4,7 @@ #include <string.h> #include <errno.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> int s6_fdholder_retrieve_maybe_delete_async (s6_fdholder_t *a, char const *id, int dodelete) { diff --git a/src/libs6/s6_fdholder_retrieve_cb.c b/src/libs6/s6_fdholder_retrieve_cb.c index e8ad7ee..39eca50 100644 --- a/src/libs6/s6_fdholder_retrieve_cb.c +++ b/src/libs6/s6_fdholder_retrieve_cb.c @@ -4,7 +4,7 @@ #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6_fdholder_setdump.c b/src/libs6/s6_fdholder_setdump.c index 8c5ae6e..9c88f6b 100644 --- a/src/libs6/s6_fdholder_setdump.c +++ b/src/libs6/s6_fdholder_setdump.c @@ -12,7 +12,7 @@ #include <skalibs/tai.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6_fdholder_start.c b/src/libs6/s6_fdholder_start.c index 7e3ddda..db1046a 100644 --- a/src/libs6/s6_fdholder_start.c +++ b/src/libs6/s6_fdholder_start.c @@ -3,7 +3,7 @@ #include <skalibs/djbunix.h> #include <skalibs/socket.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> int s6_fdholder_start (s6_fdholder_t *a, char const *path, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6_fdholder_store.c b/src/libs6/s6_fdholder_store.c index 1541905..d765df4 100644 --- a/src/libs6/s6_fdholder_store.c +++ b/src/libs6/s6_fdholder_store.c @@ -6,7 +6,7 @@ #include <skalibs/tai.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6_fdholder_store_async.c b/src/libs6/s6_fdholder_store_async.c index 541f41c..d8577ae 100644 --- a/src/libs6/s6_fdholder_store_async.c +++ b/src/libs6/s6_fdholder_store_async.c @@ -5,7 +5,7 @@ #include <errno.h> #include <skalibs/tai.h> #include <skalibs/unixmessage.h> -#include <s6/s6-fdholder.h> +#include <s6/fdholder.h> int s6_fdholder_store_async (s6_fdholder_t *a, int fd, char const *id, tain const *limit) { diff --git a/src/libs6/s6_supervise_link.c b/src/libs6/s6_supervise_link.c index 0c6852c..85534be 100644 --- a/src/libs6/s6_supervise_link.c +++ b/src/libs6/s6_supervise_link.c @@ -5,7 +5,7 @@ #include <skalibs/stralloc.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> int s6_supervise_link (char const *scdir, char const *const *servicedirs, size_t n, char const *prefix, uint32_t options, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6_supervise_link_names.c b/src/libs6/s6_supervise_link_names.c index 74392b9..71fff1d 100644 --- a/src/libs6/s6_supervise_link_names.c +++ b/src/libs6/s6_supervise_link_names.c @@ -6,6 +6,7 @@ #include <errno.h> #include <sys/stat.h> +#include <skalibs/posixplz.h> #include <skalibs/bitarray.h> #include <skalibs/tai.h> #include <skalibs/stralloc.h> @@ -13,7 +14,7 @@ #include <s6/ftrigr.h> #include <s6/ftrigw.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> static inline void do_unlink (char const *scdir, char const *const *names, size_t n, uint32_t killopts) { @@ -36,6 +37,13 @@ static uint16_t registerit (ftrigr_t *a, char *fn, size_t len, gid_t gid, uint32 return ftrigr_subscribe(a, fn, "s", 0, deadline, stamp) ; } +/* + options: bit 0: force event/ mode + bit 1: make event/ public + bit 2: don't start the service + bit 3: remove down files after starting supervisors +*/ + int s6_supervise_link_names (char const *scdir, char const *const *servicedirs, char const *const *names, size_t n, uint32_t options, tain const *deadline, tain *stamp) { size_t maxnlen = 0, maxlen = 0 ; @@ -86,7 +94,7 @@ int s6_supervise_link_names (char const *scdir, char const *const *servicedirs, uint32_t killopts = 0 ; int r ; uint16_t ids[ntotal] ; - char lname[scdirlen + maxnlen + 2] ; + char lname[scdirlen + maxnlen + 7] ; char fn[maxlen + 5 + (sizeof(S6_SUPERVISE_EVENTDIR) > 5 ? sizeof(S6_SUPERVISE_EVENTDIR) : 5)] ; if (!ftrigr_startf(&a, deadline, stamp)) return -1 ; memcpy(lname, scdir, scdirlen) ; @@ -124,6 +132,16 @@ int s6_supervise_link_names (char const *scdir, char const *const *servicedirs, killopts = 3 ; if (ftrigr_wait_and(&a, ids, m, deadline, stamp) < 0) goto errsa ; ftrigr_end(&a) ; + if (options & 8) + { + for (size_t i = 0 ; i < n ; i++) + { + size_t nlen = strlen(names[i]) ; + memcpy(lname + scdirlen + 1, names[i], nlen) ; + memcpy(lname + scdirlen + 1 + nlen, "/down", 6) ; + unlink_void(lname) ; + } + } return m ; err: diff --git a/src/libs6/s6_supervise_unlink.c b/src/libs6/s6_supervise_unlink.c index cc263e4..f981a74 100644 --- a/src/libs6/s6_supervise_unlink.c +++ b/src/libs6/s6_supervise_unlink.c @@ -9,7 +9,7 @@ #include <skalibs/allreadwrite.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> void s6_supervise_unlink (char const *scdir, char const *name, uint32_t options) { diff --git a/src/libs6/s6_supervise_unlink_names.c b/src/libs6/s6_supervise_unlink_names.c new file mode 100644 index 0000000..a0b424d --- /dev/null +++ b/src/libs6/s6_supervise_unlink_names.c @@ -0,0 +1,98 @@ +/* ISC license. */ + +#include <stdint.h> +#include <string.h> +#include <unistd.h> +#include <errno.h> +#include <sys/stat.h> + +#include <skalibs/posixplz.h> +#include <skalibs/bitarray.h> + +#include <s6/ftrigr.h> +#include <s6/supervise.h> + +static uint16_t registerit (ftrigr_t *a, char *fn, size_t len, tain const *deadline, tain *stamp) +{ + memcpy(fn + len, "/" S6_SUPERVISE_EVENTDIR, sizeof(S6_SUPERVISE_EVENTDIR) + 1) ; + return ftrigr_subscribe(a, fn, "x", 0, deadline, stamp) ; +} + +/* + options: bit 0: wait for s6-supervise to exit +*/ + +int s6_supervise_unlink_names (char const *scdir, char const *const *names, size_t n, uint32_t options, tain const *deadline, tain *stamp) +{ + size_t scdirlen = strlen(scdir) ; + size_t ntotal = n ; + unsigned char locked[bitarray_div8(n)] ; + unsigned char logged[bitarray_div8(n)] ; + if (!n) return 0 ; + memset(locked, 0, bitarray_div8(n)) ; + memset(logged, 0, bitarray_div8(n)) ; + + if (options & 1) for (size_t i = 0 ; i < n ; i++) + { + struct stat st ; + size_t nlen = strlen(names[i]) ; + int h ; + char fn[scdirlen + nlen + 6] ; + memcpy(fn, scdir, scdirlen) ; + fn[scdirlen] = '/' ; + memcpy(fn + scdirlen + 1, names[i], nlen + 1) ; + h = s6_svc_ok(fn) ; + if (h < 0) return -1 ; + if (h) bitarray_set(locked, i) ; + memcpy(fn + scdirlen + 1 + nlen, "/log", 5) ; + if (stat(fn, &st) < 0) + { + if (errno != ENOENT) return -1 ; + } + else + { + int r ; + if (!S_ISDIR(st.st_mode)) return (errno = ENOTDIR, -1) ; + r = s6_svc_ok(fn) ; + if (r < 0) return -1 ; + if (r != h) return (errno = EINVAL, -1) ; + bitarray_set(logged, i) ; + ntotal++ ; + } + } + + { + ftrigr_t a = FTRIGR_ZERO ; + unsigned int m = 0 ; + uint16_t ids[ntotal] ; + if (options & 1 && !ftrigr_startf(&a, deadline, stamp)) return -1 ; + for (size_t i = 0 ; i < n ; i++) + { + size_t nlen = strlen(names[i]) ; + char fn[scdirlen + nlen + 6 + sizeof(S6_SUPERVISE_EVENTDIR)] ; + memcpy(fn, scdir, scdirlen) ; + fn[scdirlen] = '/' ; + memcpy(fn + scdirlen + 1, names[i], nlen) ; + if (options & 1 && bitarray_peek(locked, i)) + { + ids[m] = registerit(&a, fn, scdirlen + 1 + nlen, deadline, stamp) ; + if (ids[m]) m++ ; + if (bitarray_peek(logged, i)) + { + memcpy(fn + scdirlen + 1 + nlen, "/log", 4) ; + ids[m] = registerit(&a, fn, scdirlen + 5 + nlen, deadline, stamp) ; + if (ids[m]) m++ ; + } + } + fn[scdirlen + 1 + nlen] = 0 ; + unlink_void(fn) ; + } + s6_svc_writectl(scdir, S6_SVSCAN_CTLDIR, "an", 2) ; + if (options & 1) + { + ftrigr_wait_and(&a, ids, m, deadline, stamp) ; + ftrigr_end(&a) ; + } + return m ; + } +} diff --git a/src/libs6/s6_svc_ok.c b/src/libs6/s6_svc_ok.c index 4940071..abdc85c 100644 --- a/src/libs6/s6_svc_ok.c +++ b/src/libs6/s6_svc_ok.c @@ -5,7 +5,7 @@ #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> int s6_svc_ok (char const *dir) { diff --git a/src/libs6/s6_svc_write.c b/src/libs6/s6_svc_write.c index fba8021..f2a07af 100644 --- a/src/libs6/s6_svc_write.c +++ b/src/libs6/s6_svc_write.c @@ -3,7 +3,7 @@ #include <errno.h> #include <skalibs/allreadwrite.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> int s6_svc_write (char const *fifo, char const *data, size_t datalen) { diff --git a/src/libs6/s6_svc_writectl.c b/src/libs6/s6_svc_writectl.c index 11eaf0e..dee9128 100644 --- a/src/libs6/s6_svc_writectl.c +++ b/src/libs6/s6_svc_writectl.c @@ -7,7 +7,7 @@ #include <string.h> #include <skalibs/djbunix.h> #include <skalibs/unix-transactional.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> int s6_svc_writectl (char const *service, char const *subdir, char const *s, size_t len) { diff --git a/src/libs6/s6_svstatus_pack.c b/src/libs6/s6_svstatus_pack.c index ef2d5bd..a769c08 100644 --- a/src/libs6/s6_svstatus_pack.c +++ b/src/libs6/s6_svstatus_pack.c @@ -4,7 +4,7 @@ #include <skalibs/uint16.h> #include <skalibs/uint64.h> #include <skalibs/tai.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> void s6_svstatus_pack (char *pack, s6_svstatus_t const *sv) { @@ -15,8 +15,6 @@ void s6_svstatus_pack (char *pack, s6_svstatus_t const *sv) pack[34] = sv->flagpaused | (sv->flagfinishing << 1) | - (sv->flagwant << 2) | - (sv->flagwantup << 3) | - (sv->flagready << 4) | - (sv->flagthrottled << 5) ; + (sv->flagwantup << 2) | + (sv->flagready << 3) ; } diff --git a/src/libs6/s6_svstatus_read.c b/src/libs6/s6_svstatus_read.c index edcf38b..376a0c7 100644 --- a/src/libs6/s6_svstatus_read.c +++ b/src/libs6/s6_svstatus_read.c @@ -2,7 +2,7 @@ #include <string.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> int s6_svstatus_read (char const *dir, s6_svstatus_t *status) { diff --git a/src/libs6/s6_svstatus_unpack.c b/src/libs6/s6_svstatus_unpack.c index b641c8c..59df671 100644 --- a/src/libs6/s6_svstatus_unpack.c +++ b/src/libs6/s6_svstatus_unpack.c @@ -4,7 +4,7 @@ #include <skalibs/uint16.h> #include <skalibs/uint64.h> #include <skalibs/tai.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> void s6_svstatus_unpack (char const *pack, s6_svstatus_t *sv) { @@ -18,8 +18,6 @@ void s6_svstatus_unpack (char const *pack, s6_svstatus_t *sv) sv->wstat = wstat ; sv->flagpaused = pack[34] & 1 ; sv->flagfinishing = !!(pack[34] & 2) ; - sv->flagwant = !!(pack[34] & 4) ; - sv->flagwantup = !!(pack[34] & 8) ; - sv->flagready = !!(pack[34] & 16) ; - sv->flagthrottled = !!(pack[34] & 32) ; + sv->flagwantup = !!(pack[34] & 4) ; + sv->flagready = !!(pack[34] & 8) ; } diff --git a/src/libs6/s6_svstatus_write.c b/src/libs6/s6_svstatus_write.c index 29d4f40..a75b3b1 100644 --- a/src/libs6/s6_svstatus_write.c +++ b/src/libs6/s6_svstatus_write.c @@ -2,7 +2,7 @@ #include <string.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> int s6_svstatus_write (char const *dir, s6_svstatus_t const *status) { diff --git a/src/libs6/s6lock_acquire.c b/src/libs6/s6lock_acquire.c index e73ace0..fa500aa 100644 --- a/src/libs6/s6lock_acquire.c +++ b/src/libs6/s6lock_acquire.c @@ -9,7 +9,7 @@ #include <skalibs/tai.h> #include <skalibs/gensetdyn.h> #include <skalibs/textclient.h> -#include <s6/s6lock.h> +#include <s6/lock.h> int s6lock_acquire (s6lock_t *a, uint16_t *u, char const *path, uint32_t options, tain const *limit, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6lock_check.c b/src/libs6/s6lock_check.c index da08eff..b62d790 100644 --- a/src/libs6/s6lock_check.c +++ b/src/libs6/s6lock_check.c @@ -3,7 +3,7 @@ #include <errno.h> #include <skalibs/error.h> #include <skalibs/gensetdyn.h> -#include <s6/s6lock.h> +#include <s6/lock.h> int s6lock_check (s6lock_t *a, uint16_t id) { diff --git a/src/libs6/s6lock_end.c b/src/libs6/s6lock_end.c index e278bd8..8611289 100644 --- a/src/libs6/s6lock_end.c +++ b/src/libs6/s6lock_end.c @@ -4,7 +4,7 @@ #include <skalibs/genalloc.h> #include <skalibs/gensetdyn.h> #include <skalibs/textclient.h> -#include <s6/s6lock.h> +#include <s6/lock.h> void s6lock_end (s6lock_t *a) { diff --git a/src/libs6/s6lock_release.c b/src/libs6/s6lock_release.c index 662b876..96fa3d0 100644 --- a/src/libs6/s6lock_release.c +++ b/src/libs6/s6lock_release.c @@ -5,7 +5,7 @@ #include <skalibs/uint16.h> #include <skalibs/gensetdyn.h> #include <skalibs/textclient.h> -#include <s6/s6lock.h> +#include <s6/lock.h> int s6lock_release (s6lock_t *a, uint16_t i, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6lock_start.c b/src/libs6/s6lock_start.c index 6d81628..ca8fcc8 100644 --- a/src/libs6/s6lock_start.c +++ b/src/libs6/s6lock_start.c @@ -1,7 +1,7 @@ /* ISC license. */ #include <skalibs/textclient.h> -#include <s6/s6lock.h> +#include <s6/lock.h> int s6lock_start (s6lock_t *a, char const *path, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6lock_startf.c b/src/libs6/s6lock_startf.c index e58cb46..be6e0c8 100644 --- a/src/libs6/s6lock_startf.c +++ b/src/libs6/s6lock_startf.c @@ -3,7 +3,7 @@ #include <errno.h> #include <skalibs/posixplz.h> #include <skalibs/textclient.h> -#include <s6/s6lock.h> +#include <s6/lock.h> int s6lock_startf (s6lock_t *a, char const *lockdir, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6lock_update.c b/src/libs6/s6lock_update.c index fdf1001..4866e7c 100644 --- a/src/libs6/s6lock_update.c +++ b/src/libs6/s6lock_update.c @@ -10,7 +10,7 @@ #include <skalibs/gensetdyn.h> #include <skalibs/textclient.h> -#include <s6/s6lock.h> +#include <s6/lock.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6lock_wait_and.c b/src/libs6/s6lock_wait_and.c index 801e8a0..eca7946 100644 --- a/src/libs6/s6lock_wait_and.c +++ b/src/libs6/s6lock_wait_and.c @@ -2,7 +2,7 @@ #include <errno.h> #include <skalibs/iopause.h> -#include <s6/s6lock.h> +#include <s6/lock.h> int s6lock_wait_and (s6lock_t *a, uint16_t const *idlist, unsigned int n, tain const *deadline, tain *stamp) { diff --git a/src/libs6/s6lock_wait_or.c b/src/libs6/s6lock_wait_or.c index 421978b..4e2a501 100644 --- a/src/libs6/s6lock_wait_or.c +++ b/src/libs6/s6lock_wait_or.c @@ -4,7 +4,7 @@ #include <skalibs/iopause.h> -#include <s6/s6lock.h> +#include <s6/lock.h> #include <skalibs/posixishard.h> diff --git a/src/libs6/s6lock_zero.c b/src/libs6/s6lock_zero.c index a4e0138..3d35d40 100644 --- a/src/libs6/s6lock_zero.c +++ b/src/libs6/s6lock_zero.c @@ -1,5 +1,5 @@ /* ISC license. */ -#include <s6/s6lock.h> +#include <s6/lock.h> s6lock_t const s6lock_zero = S6LOCK_ZERO ; diff --git a/src/libs6/s6lockd.c b/src/libs6/s6lockd.c index 764e102..8724019 100644 --- a/src/libs6/s6lockd.c +++ b/src/libs6/s6lockd.c @@ -20,7 +20,7 @@ #include <skalibs/textmessage.h> #include <skalibs/textclient.h> -#include <s6/s6lock.h> +#include <s6/lock.h> #define USAGE "s6lockd lockdir" #define X() strerr_dief1x(101, "internal inconsistency, please submit a bug-report.") diff --git a/src/supervision/deps-exe/s6-svdir-unlink b/src/supervision/deps-exe/s6-svdir-unlink deleted file mode 100644 index 08815d9..0000000 --- a/src/supervision/deps-exe/s6-svdir-unlink +++ /dev/null @@ -1,2 +0,0 @@ -${LIBS6} --lskarnet diff --git a/src/supervision/deps-exe/s6-svdir-link b/src/supervision/deps-exe/s6-svlink index 16eaae2..16eaae2 100644 --- a/src/supervision/deps-exe/s6-svdir-link +++ b/src/supervision/deps-exe/s6-svlink diff --git a/src/supervision/deps-exe/s6-svunlink b/src/supervision/deps-exe/s6-svunlink new file mode 100644 index 0000000..16eaae2 --- /dev/null +++ b/src/supervision/deps-exe/s6-svunlink @@ -0,0 +1,5 @@ +${LIBS6} +-lskarnet +${SOCKET_LIB} +${SYSCLOCK_LIB} +${SPAWN_LIB} diff --git a/src/supervision/s6-permafailon.c b/src/supervision/s6-permafailon.c index b5bb469..d34d09b 100644 --- a/src/supervision/s6-permafailon.c +++ b/src/supervision/s6-permafailon.c @@ -11,7 +11,7 @@ #include <skalibs/tai.h> #include <skalibs/exec.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-permafailon seconds deathcount statuslist prog..." #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c index 84290ab..cc6779a 100644 --- a/src/supervision/s6-supervise.c +++ b/src/supervision/s6-supervise.c @@ -25,7 +25,7 @@ #include <skalibs/skamisc.h> #include <s6/ftrigw.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-supervise dir" #define CTL S6_SUPERVISE_CTLDIR "/control" @@ -416,7 +416,6 @@ static int uplastup_z (void) status.wstat = (int)status.pid ; status.flagpaused = 0 ; status.flagready = 0 ; - status.flagthrottled = 0 ; flagdying = 0 ; tain_wallclock_read(&status.stamp) ; if (notifyfd >= 0) diff --git a/src/supervision/s6-svc.c b/src/supervision/s6-svc.c index 30a6fb3..5467ea2 100644 --- a/src/supervision/s6-svc.c +++ b/src/supervision/s6-svc.c @@ -10,7 +10,7 @@ #include <skalibs/exec.h> #include <s6/config.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svc [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -T timeout ] [ -abqhkti12pcyroduxOX ] servicedir" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/supervision/s6-svdir-unlink.c b/src/supervision/s6-svdir-unlink.c deleted file mode 100644 index 0e8699e..0000000 --- a/src/supervision/s6-svdir-unlink.c +++ /dev/null @@ -1,38 +0,0 @@ -/* ISC license. */ - -#include <stdint.h> - -#include <skalibs/sgetopt.h> -#include <skalibs/strerr2.h> - -#include <s6/s6-supervise.h> - -#define USAGE "s6-svdir-unlink [ -d ] [ -x ] scandir servicename" -#define dieusage() strerr_dieusage(100, USAGE) - -int main (int argc, char const *const *argv) -{ - uint32_t options = 0 ; - PROG = "s6-svdir-link" ; - { - subgetopt l = SUBGETOPT_ZERO ; - for (;;) - { - int opt = subgetopt_r(argc, argv, "dx", &l) ; - if (opt == -1) break ; - switch (opt) - { - case 'd' : options = 3 ; break ; - case 'x' : options = 1 ; break ; - default : dieusage() ; - } - } - argc -= l.ind ; argv += l.ind ; - } - if (argc < 2) dieusage() ; - - if (!argv[1][0] || argv[1][0] == '.' || argv[1][0] == '/') - strerr_dief1x(100, "invalid service name") ; - s6_supervise_unlink(argv[0], argv[1], options) ; - return 0 ; -} diff --git a/src/supervision/s6-svdt-clear.c b/src/supervision/s6-svdt-clear.c index 791dd61..6b36718 100644 --- a/src/supervision/s6-svdt-clear.c +++ b/src/supervision/s6-svdt-clear.c @@ -1,7 +1,7 @@ /* ISC license. */ #include <skalibs/strerr2.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svdt-clear servicedir" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/supervision/s6-svdt.c b/src/supervision/s6-svdt.c index ab0dfc8..3df356a 100644 --- a/src/supervision/s6-svdt.c +++ b/src/supervision/s6-svdt.c @@ -6,7 +6,7 @@ #include <skalibs/strerr2.h> #include <skalibs/sgetopt.h> #include <skalibs/sig.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svdt [ -S | -s ] [ -n maxentries ] servicedir" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/supervision/s6-svdir-link.c b/src/supervision/s6-svlink.c index 8329197..159f817 100644 --- a/src/supervision/s6-svdir-link.c +++ b/src/supervision/s6-svlink.c @@ -4,16 +4,19 @@ #include <stdint.h> #include <string.h> #include <sys/stat.h> +#include <libgen.h> +#include <skalibs/posixplz.h> #include <skalibs/types.h> #include <skalibs/sgetopt.h> #include <skalibs/tai.h> #include <skalibs/strerr2.h> +#include <skalibs/stralloc.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> -#define USAGE "s6-svdir-link [ -d ] [ -f ] [ -P | -p ] [ -t timeout ] scandir name servicedir" +#define USAGE "s6-svlink [ -d | -D ] [ -f ] [ -P ] [ -t timeout ] scandir servicedir [ name ]" #define dieusage() strerr_dieusage(100, USAGE) static inline void checkscandir (char const *s) @@ -67,20 +70,21 @@ int main (int argc, char const *const *argv) { tain tto = TAIN_INFINITE_RELATIVE ; uint32_t options = 0 ; - PROG = "s6-svdir-link" ; + char const *name ; + PROG = "s6-svlink" ; { unsigned int t = 0 ; subgetopt l = SUBGETOPT_ZERO ; for (;;) { - int opt = subgetopt_r(argc, argv, "dfPpt:", &l) ; + int opt = subgetopt_r(argc, argv, "dDfPt:", &l) ; if (opt == -1) break ; switch (opt) { - case 'd' : options |= 4 ; break ; + case 'd' : options |= 12 ; break ; + case 'D' : options |= 4 ; options &= ~8U ; break ; case 'f' : options |= 1 ; break ; case 'P' : options |= 2 ; break ; - case 'p' : options &= ~2U ; break ; case 't' : if (!uint0_scan(l.arg, &t)) dieusage() ; break ; default : dieusage() ; } @@ -88,18 +92,26 @@ int main (int argc, char const *const *argv) argc -= l.ind ; argv += l.ind ; if (t) tain_from_millisecs(&tto, t) ; } - if (argc < 3) dieusage() ; + if (argc < 2) dieusage() ; + if (argv[2]) name = argv[2] ; + else + { + stralloc sa = STRALLOC_ZERO ; + if (!stralloc_cats(&sa, argv[1]) || !stralloc_0(&sa)) + strerr_diefu1sys(111, "stralloc_cats") ; + name = basename(sa.s) ; + } if (!argv[0][0]) strerr_dief1x(100, "invalid scandir") ; - if (!argv[1][0] || argv[1][0] == '.' || argv[1][0] == '/') + if (!argv[1][0]) strerr_dief1x(100, "invalid servicedir") ; + if (!name[0] || name[0] == '.' || name[0] == '/') strerr_dief1x(100, "invalid name") ; - if (!argv[2][0]) strerr_dief1x(100, "invalid servicedir") ; checkscandir(argv[0]) ; tain_now_set_stopwatch_g() ; tain_add_g(&tto, &tto) ; - if (s6_supervise_link_names_g(argv[0], argv + 2, argv + 1, 1, options, &tto) == -1) - strerr_diefu6sys(111, "link servicedir ", argv[2], " into scandir ", argv[0], " with name ", argv[1]) ; + if (s6_supervise_link_names_g(argv[0], argv + 1, &name, 1, options, &tto) == -1) + strerr_diefu6sys(errno == ETIMEDOUT ? 99 : 111, "link servicedir ", argv[1], " into scandir ", argv[0], " with name ", name) ; return 0 ; } diff --git a/src/supervision/s6-svok.c b/src/supervision/s6-svok.c index 176d8a8..c6c6bd4 100644 --- a/src/supervision/s6-svok.c +++ b/src/supervision/s6-svok.c @@ -1,7 +1,7 @@ /* ISC license. */ #include <skalibs/strerr2.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svok servicedir" diff --git a/src/supervision/s6-svperms.c b/src/supervision/s6-svperms.c index fb35715..4b8de05 100644 --- a/src/supervision/s6-svperms.c +++ b/src/supervision/s6-svperms.c @@ -12,7 +12,7 @@ #include <skalibs/buffer.h> #include <skalibs/strerr2.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svperms [ -v ] [ -u | -g group | -G group | -o | -O group ] [ -e | -E group ] servicedir..." #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/supervision/s6-svscan.c b/src/supervision/s6-svscan.c index da2dc30..ee0b013 100644 --- a/src/supervision/s6-svscan.c +++ b/src/supervision/s6-svscan.c @@ -22,7 +22,7 @@ #include <skalibs/exec.h> #include <s6/config.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svscan [ -c maxservices ] [ -t timeout ] [ -d notif ] [ -X consoleholder ] [ dir ]" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/supervision/s6-svscanctl.c b/src/supervision/s6-svscanctl.c index b21c611..119d41e 100644 --- a/src/supervision/s6-svscanctl.c +++ b/src/supervision/s6-svscanctl.c @@ -2,7 +2,7 @@ #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svscanctl [ -zabhitqnN ] svscandir" #define dieusage() strerr_dieusage(100, USAGE) diff --git a/src/supervision/s6-svstat.c b/src/supervision/s6-svstat.c index cbda314..979552f 100644 --- a/src/supervision/s6-svstat.c +++ b/src/supervision/s6-svstat.c @@ -13,7 +13,7 @@ #include <skalibs/sig.h> #include <skalibs/tai.h> #include <skalibs/djbunix.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #define USAGE "s6-svstat [ -uwNrpest | -o up,wantedup,normallyup,ready,paused,pid,exitcode,signal,signum,updownsince,readysince,updownfor,readyfor ] [ -n ] servicedir" #define dieusage() strerr_dieusage(100, USAGE) @@ -35,7 +35,7 @@ struct funcmap_s static void pr_up (buffer *b, s6_svstatus_t const *st) { - buffer_putsnoflush(b, st->pid && !st->flagfinishing ? st->flagthrottled ? "throttled" : "true" : "false") ; + buffer_putsnoflush(b, st->pid && !st->flagfinishing ? "true" : "false") ; } static void pr_wantedup (buffer *b, s6_svstatus_t const *st) @@ -210,8 +210,6 @@ static void legacy (s6_svstatus_t *st, int flagnum) buffer_putnoflush(buffer_1small, fmt, uint64_fmt(fmt, status.stamp.sec.x)) ; buffer_putnoflush(buffer_1small, " seconds", 8) ; - if (isup && status.flagthrottled) - buffer_putnoflush(buffer_1small, ", throttled", 11) ; if (isup && !normallyup) buffer_putnoflush(buffer_1small, ", normally down", 15) ; if (!isup && normallyup) diff --git a/src/supervision/s6-svunlink.c b/src/supervision/s6-svunlink.c new file mode 100644 index 0000000..986be65 --- /dev/null +++ b/src/supervision/s6-svunlink.c @@ -0,0 +1,49 @@ +/* ISC license. */ + +#include <stdint.h> + +#include <skalibs/posixplz.h> +#include <skalibs/types.h> +#include <skalibs/sgetopt.h> +#include <skalibs/strerr2.h> +#include <skalibs/tai.h> + +#include <s6/supervise.h> + +#define USAGE "s6-svdir-unlink [ -X ] [ -t timeout ] scandir servicename" +#define dieusage() strerr_dieusage(100, USAGE) + +int main (int argc, char const *const *argv) +{ + tain tto = TAIN_INFINITE_RELATIVE ; + uint32_t options = 1 ; + PROG = "s6-svdir-link" ; + { + unsigned int t = 0 ; + subgetopt l = SUBGETOPT_ZERO ; + for (;;) + { + int opt = subgetopt_r(argc, argv, "Xt:", &l) ; + if (opt == -1) break ; + switch (opt) + { + case 'X' : options &= ~1U ; break ; + case 't' : if (!uint0_scan(l.arg, &t)) dieusage() ; break ; + default : dieusage() ; + } + } + argc -= l.ind ; argv += l.ind ; + if (t) tain_from_millisecs(&tto, t) ; + } + if (argc < 2) dieusage() ; + + if (!argv[1][0] || argv[1][0] == '.' || argv[1][0] == '/') + strerr_dief1x(100, "invalid service name") ; + + tain_now_set_stopwatch_g() ; + tain_add_g(&tto, &tto) ; + + if (s6_supervise_unlink_names_g(argv[0], argv + 1, 1, options, &tto) == -1) + strerr_diefu4sys(111, "prepare unlinking of service ", argv[1], " in scandir ", argv[0]) ; + return 0 ; +} diff --git a/src/supervision/s6_svlisten_loop.c b/src/supervision/s6_svlisten_loop.c index 8eee96b..c97427f 100644 --- a/src/supervision/s6_svlisten_loop.c +++ b/src/supervision/s6_svlisten_loop.c @@ -8,7 +8,7 @@ #include <skalibs/stralloc.h> #include <skalibs/djbunix.h> #include <s6/ftrigr.h> -#include <s6/s6-supervise.h> +#include <s6/supervise.h> #include "s6-svlisten.h" void s6_svlisten_init (int argc, char const *const *argv, s6_svlisten_t *foo, uint16_t *ids, unsigned char *upstate, unsigned char *readystate, tain const *deadline) |