Some wishes for s6-log & s6-envdir

From: Olivier Brunel <>
Date: Thu, 26 Feb 2015 00:06:42 +0100


Sorry, no bug reports; Couple of feature wishes though :p

- s6-envdir: an option to clear the environment first would be nice, so
we know the environment that it will execute into is coming from envdir
only, without possible "leftovers"

- s6-envdir: also, an option to look for prog (to exec into) in the PATH
from the new environment could be nice as well.

E.g. I have a script that I need to run, but I don't know what the
original environment is. Right now I have it start with:
/bin/emptyenv /bin/s6-envdir /path/to/env /bin/exec

That to ensure everything else runs with the environment I want, when
the original one could even have an "invalid" PATH. With both options, I
could reduce it to a simple e.g:
/bin/s6-envdir -c -p /path/to/env

And that's it. Not a big deal, but might be nice (esp. the clear option).

- s6-log: I'd like a control directive to set a prefix, that would be
printed before the actual log line. E.g. with
p "s6-log: alert: " 1

One would get the same as 2 only on stdout. Not that that is very
useful, but I have a few loggers that can send some lines to a fifo for
them to be processed, and such a prefix would allow me to e.g. specify
the service name before the log line (as well as a simpler way to ID the
event, to save parsing the line again).

(In fact, I could even do with a directive so only the "prefix" is used
(written to stdout), without the actual log line, so when specific lines
are selected, only a pre-defined text is used/written to 1, since that's
all I would need... but a prefix is good enough.)

Received on Wed Feb 25 2015 - 23:06:42 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC