diff options
| -rw-r--r-- | NEWS | 1 | ||||
| -rw-r--r-- | doc/index.html | 2 | ||||
| -rw-r--r-- | doc/s6-frontend-helper-echo.html | 40 | ||||
| -rw-r--r-- | doc/s6-frontend-helper-echore.html | 30 | ||||
| -rw-r--r-- | package/deps.mak | 3 | ||||
| -rw-r--r-- | package/modes | 1 | ||||
| -rw-r--r-- | package/targets.mak | 1 | ||||
| -rw-r--r-- | src/helpers/deps-exe/s6-frontend-helper-echo | 1 | ||||
| -rw-r--r-- | src/helpers/s6-frontend-helper-echo.c | 54 |
9 files changed, 32 insertions, 101 deletions
@@ -9,6 +9,7 @@ In 0.1.0.0 - New commands: s6 live reset, s6 apply. - New shortcuts: s6 enable,disable,start,stop,kill,apply. - The fdholder user is now a configuration variable. + - New option for s6 live stop: -c|--clean In 0.0.1.2 diff --git a/doc/index.html b/doc/index.html index 98e8b60..6c1534a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -177,7 +177,7 @@ the previous versions of s6-frontend and the current one. </li> <ul> <li> <a href="s6-frontend.html">The <tt>s6-frontend</tt> program</a> </li> -<li> <a href="s6-frontend-helper-echo.html">The <tt>s6-frontend-helper-echo</tt> program</a> </li> +<li> <a href="s6-frontend-helper-echore.html">The <tt>s6-frontend-helper-echore</tt> program</a> </li> <li> <a href="s6-frontend-helper-kill.html">The <tt>s6-frontend-helper-kill</tt> program</a> </li> </ul> diff --git a/doc/s6-frontend-helper-echo.html b/doc/s6-frontend-helper-echo.html deleted file mode 100644 index dbe5ea4..0000000 --- a/doc/s6-frontend-helper-echo.html +++ /dev/null @@ -1,40 +0,0 @@ -<html> - <head> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="color-scheme" content="dark light" /> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <meta http-equiv="Content-Language" content="en" /> - <title>s6-frontend: the s6-frontend-helper-echo program</title> - <meta name="Description" content="s6-frontend: the s6-frontend-helper-echo program" /> - <meta name="Keywords" content="s6 s6-frontend helper echo" /> - <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> - </head> -<body> - -<p> -<a href="index.html">s6-frontend</a><br /> -<a href="//skarnet.org/software/">Software</a><br /> -<a href="//skarnet.org/">skarnet.org</a> -</p> - -<h1> The <tt>s6-frontend-helper-echo</tt> internal program </h1> - -<p> - <tt>s6-frontend-helper-echo</tt> is a small utility to echo arguments to stdout. -It is not meant to be called directly, -although nothing bad will happen if you do. It is used in command lines crafted by -<a href="s6_live.html#status">s6 live status</a> due to unreliable and -inconsistent handling of options and dash arguments in the various POSIX <a -href="https://pubs.opengroup.org/onlinepubs/9799919799/utilities/echo.html">echo</a> -implementations. -</p> - -<p> - <tt>s6-frontend-helper-echo</tt> is basically a copy of -<a href="//skarnet.org/software/s6-portable-utils/s6-echo.html">s6-echo</a> and -behaves exactly the same. The program has been included in s6-frontend in order to avoid -a dependency to <a href="//skarnet.org/software/s6-portable-utils/">s6-portable-utils</a>. -</p> - -</body> -</html> diff --git a/doc/s6-frontend-helper-echore.html b/doc/s6-frontend-helper-echore.html new file mode 100644 index 0000000..a4faf05 --- /dev/null +++ b/doc/s6-frontend-helper-echore.html @@ -0,0 +1,30 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="color-scheme" content="dark light" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-frontend: the s6-frontend-helper-echore program</title> + <meta name="Description" content="s6-frontend: the s6-frontend-helper-echore program" /> + <meta name="Keywords" content="s6 s6-frontend helper echo" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-frontend</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-frontend-helper-echore</tt> internal program </h1> + +<p> + <tt>s6-frontend-helper-echore</tt> is a small utility to print arguments to stdout +in a convenient form for the grepping that is performed at some point during +the <a href="s6_live.html#status"><tt>s6 live status</tt></a> command. +It is not meant to be called directly, although nothing bad will happen if you do. +</p> + +</body> +</html> diff --git a/package/deps.mak b/package/deps.mak index 001accc..ea37a33 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -3,7 +3,6 @@ # src/s6-frontend/s6-frontend-internal.h: src/include/s6-frontend/config.h src/include-local/s6f.h -src/helpers/s6-frontend-helper-echo.o src/helpers/s6-frontend-helper-echo.lo: src/helpers/s6-frontend-helper-echo.c src/helpers/s6-frontend-helper-echore.o src/helpers/s6-frontend-helper-echore.lo: src/helpers/s6-frontend-helper-echore.c src/helpers/s6-frontend-helper-kill.o src/helpers/s6-frontend-helper-kill.lo: src/helpers/s6-frontend-helper-kill.c src/libs6f/s6f_confdir_open.o src/libs6f/s6f_confdir_open.lo: src/libs6f/s6f_confdir_open.c src/include-local/s6f.h @@ -45,8 +44,6 @@ src/s6-frontend/version.o src/s6-frontend/version.lo: src/s6-frontend/version.c src/s6-frontend/version_export.o src/s6-frontend/version_export.lo: src/s6-frontend/version_export.c src/s6-frontend/s6-frontend-internal.h src/include/s6-frontend/config.h src/include-local/s6f.h src/s6-frontend/version_show.o src/s6-frontend/version_show.lo: src/s6-frontend/version_show.c src/s6-frontend/s6-frontend-internal.h src/include/s6-frontend/config.h -s6-frontend-helper-echo: EXTRA_LIBS := -s6-frontend-helper-echo: src/helpers/s6-frontend-helper-echo.o -lskarnet s6-frontend-helper-echore: EXTRA_LIBS := s6-frontend-helper-echore: src/helpers/s6-frontend-helper-echore.o -lskarnet s6-frontend-helper-kill: EXTRA_LIBS := diff --git a/package/modes b/package/modes index c24e49d..c93feff 100644 --- a/package/modes +++ b/package/modes @@ -1,5 +1,4 @@ s6 0755 s6-frontend 0755 s6-frontend-helper-kill 0755 -s6-frontend-helper-echo 0755 s6-frontend-helper-echore 0755 diff --git a/package/targets.mak b/package/targets.mak index 6fb3b49..8fc3c95 100644 --- a/package/targets.mak +++ b/package/targets.mak @@ -4,7 +4,6 @@ s6 \ LIBEXEC_TARGETS := \ s6-frontend \ s6-frontend-helper-kill \ -s6-frontend-helper-echo \ s6-frontend-helper-echore \ EXTRA_TARGETS := \ diff --git a/src/helpers/deps-exe/s6-frontend-helper-echo b/src/helpers/deps-exe/s6-frontend-helper-echo deleted file mode 100644 index e7187fe..0000000 --- a/src/helpers/deps-exe/s6-frontend-helper-echo +++ /dev/null @@ -1 +0,0 @@ --lskarnet diff --git a/src/helpers/s6-frontend-helper-echo.c b/src/helpers/s6-frontend-helper-echo.c deleted file mode 100644 index 5d416bd..0000000 --- a/src/helpers/s6-frontend-helper-echo.c +++ /dev/null @@ -1,54 +0,0 @@ -/* ISC license. */ - -#include <unistd.h> - -#include <skalibs/uint64.h> -#include <skalibs/buffer.h> -#include <skalibs/envexec.h> - -#define USAGE "s6-frontend-helper-echo [ -n ] [ -s sep ] args..." - -enum golb_e -{ - GOLB_CHOMP = 0x01, -} ; - -enum gola_e -{ - GOLA_SEP, - GOLA_N -} ; - -int main (int argc, char const *const *argv) -{ - static gol_bool const rgolb[] = - { - { .so = 'n', .lo = "chomp", .clear = 0, .set = GOLB_CHOMP }, - } ; - static gol_arg const rgola[] = - { - { .so = 's', .lo = "separator", .i = GOLA_SEP }, - } ; - uint64_t wgolb = 0 ; - char const *wgola[GOLA_N] = { [GOLA_SEP] = " " } ; - PROG = "s6-frontend-helper-echo" ; - { - unsigned int golc = GOL_main(argc, argv, rgolb, rgola, &wgolb, wgola) ; - argc -= golc ; argv += golc ; - } - - for (; *argv ; argv++) - { - if (buffer_puts(buffer_1small, *argv) == -1) goto err ; - if (argv[1] && buffer_put(buffer_1small, wgola[GOLA_SEP], 1) == -1) goto err ; - } - if (!(wgolb & GOLB_CHOMP)) - { - if (buffer_put(buffer_1small, "\n", 1) == -1) goto err ; - } - if (!buffer_flush(buffer_1small)) goto err ; - _exit(0) ; - -err: - strerr_diefu1sys(111, "write to stdout") ; -} |
