[PATCH] s6-log: Fix tainstamp being truncated

2015-02-08 Thread Olivier Brunel
Signed-off-by: Olivier Brunel j...@jjacky.com --- TIMESTAMP is 25 char long, so just enough for the tainstamp with its @-prefix. This was actually overwriting the last character in the tainstamp! src/daemontools-extras/s6-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

loopwhilex

2015-02-17 Thread Olivier Brunel
Hi, Couple of things regarding loopwhilex: - First off, I found the doc to be a bit confusing, because you alternate between talking about when loopwhilex keeps running prog, and when it stops/exits. In fact, it's confusing enough that you yourself got it wrong :p -n : negate the test: run

Re: loopwhilex

2015-02-18 Thread Olivier Brunel
On 02/18/15 01:17, Laurent Bercot wrote: On 18/02/2015 00:22, Olivier Brunel wrote: - First off, I found the doc to be a bit confusing, because you alternate between talking about when loopwhilex keeps running prog, and when it stops/exits. Yes, it's confusing, but it's still accurate

Re: How to report a death by signal ?

2015-02-18 Thread Olivier Brunel
On 02/18/15 14:20, Laurent Bercot wrote: On 18/02/2015 14:04, Olivier Brunel wrote: I don't follow, what's wrong with using a fd? It needs a convention between G and P. And I can't do that, because G and P are not necessarily both execline commands. They are normal Unix programs

Re: Feature requests for execline s6

2015-01-26 Thread Olivier Brunel
On 01/26/15 23:18, Laurent Bercot wrote: - execline: I'd like the addition of a new command, e.g. readvar, that would allow to read the content/first line of a file into a variable. IOW, something similar to importas (including an optional default value), only instead of specifying an

[PATCH] envuidgid: Fix error message

2015-03-20 Thread Olivier Brunel
Signed-off-by: Olivier Brunel j...@jjacky.com --- src/daemontools-extras/s6-envuidgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemontools-extras/s6-envuidgid.c b/src/daemontools-extras/s6-envuidgid.c index 3a58c3c..3712411 100644 --- a/src/daemontools-extras/s6

s6-devd, stdin stdout

2015-03-07 Thread Olivier Brunel
Hi, I have a question regarding s6-devd: why does it set its stdin stdout to /dev/null on start? This seems non-obvious to me, and isn't documented. I'm specifically wondering about stdout, since it means all the children/helpers launched will also have their stdout be /dev/null, so anything

[PATCH] examples: Fix syslog LOGSCRIPT

2015-03-03 Thread Olivier Brunel
Log lines are actually prefixed with uids from $IPCREMOTEEUID $IPCREMOTEEGID, so they should be acocunted for in the regexs. Signed-off-by: Olivier Brunel j...@jjacky.com --- Also note the need to use \s because, AFAIK, there's no way to use spaces in the regex then, as space is a delimiter

Re: s6-rc design ; comparison with anopa

2015-04-24 Thread Olivier Brunel
On 04/23/15 17:40, Laurent Bercot wrote: (...) Three kinds of services --- Like anopa, s6-rc works internally with two kinds of services: longrun, which is simply defined by a service directory that will be directly managed by s6, and oneshot, which is defined by a

[PATCH] devd: Fix invalid option used for s6-uevent-listener

2015-04-27 Thread Olivier Brunel
Signed-off-by: Olivier Brunel j...@jjacky.com --- src/minutils/s6-devd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minutils/s6-devd.c b/src/minutils/s6-devd.c index 9df5c80..74f2d41 100644 --- a/src/minutils/s6-devd.c +++ b/src/minutils/s6-devd.c @@ -63,7 +63,7

build system license

2015-04-09 Thread Olivier Brunel
Hey Laurent, Quick question regarding your build system, that is ./configure or tools/gen-deps.sh and the likes: how are they licensed? Most of your source files have a ISC license mention, but those do not. Are they also released under the same license, or? (Asking cause I'd like to use them

[PATCH] forstdin: Fix possible error/hanging w/ -p

2015-06-09 Thread Olivier Brunel
.) Blocking SIGCHLD until we've added the pid to the array ensures this doesn't happen. (Thus we bring back the call to waitn removed in 5053ea39, which didn't really fix the issue.) Signed-off-by: Olivier Brunel j...@jjacky.com --- Hey Laurent, So I have been hit by a bug in forstdin for some time

[PATCH] s6-uevent-spawner: Fix possibly delaying uevents

2015-06-14 Thread Olivier Brunel
then be processed, and maybe the new ones too, maybe only part of them. Rince, repeat. We now call handle_stdin() if the buffer isn't empty, so it'll process any such buffered uevents, knowing that it will read if needed (and we can pretty much assume the data will be there in this case). Signed-off-by: Olivier

Re: [PATCH] s6-uevent-spawner: Fix possibly delaying uevents

2015-06-14 Thread Olivier Brunel
On 06/14/15 21:11, Laurent Bercot wrote: On 14/06/2015 14:37, Olivier Brunel wrote: Because of the buffered IO, the possible scenario could occur: - netlink uevents (plural) occur, i.e. data ready on stdin - iopause triggered, handle_stdin() called. The first uevent is processed, child

bitarray: Add first{clear,set}_skip

2015-12-27 Thread Olivier Brunel
Hey Laurent, So skalibs contains a few functions to work with bit arrays, but only some of the supported operations can be done with an offset (unless I missed it). One can obviously clear, set or peek at any bit within the array, but also set/clear a group of bits from an offset via

[PATCH] bitarray_not: Fix skipping a byte

2016-05-14 Thread Olivier Brunel
Signed-off-by: Olivier Brunel <j...@jjacky.com> --- src/libstddjb/bitarray_not.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstddjb/bitarray_not.c b/src/libstddjb/bitarray_not.c index 4bd95ad..de37b9f 100644 --- a/src/libstddjb/bitarray_not.c +++ b/src/lib

Re: [announce] Fall 2016 release

2016-10-28 Thread Olivier Brunel
On Fri, 28 Oct 2016 15:46:25 + "Laurent Bercot" wrote: > * execline-2.2.0.0 > > > - Compatibility to skalibs-2.4.0.0. > - New option "-I" to backtick and withstdinas. > - New option "-t" to wait: it can now wait for children with a > timeout.

backtick segfault

2016-10-11 Thread Olivier Brunel
Hey, So first off, quick question about the doc of multisubstitute, where it reads under Options: "If a backtick directive was given with the -i option..." I don't get that. There's no backtick directive listed above, and trying it use one doesn't seem to work ("unrecognized directive

How to write an execline helper in execline?

2016-10-11 Thread Olivier Brunel
Hey, So I find myself willing to write what I'll call execline helpers - i.e. prog that do their work, then exec into (the rest of) their command line, in typical execline fashion - in execline. IOW an execline script that can be used as execline "command". But the whole "exec into the (rest of

Re: How to write an execline helper in execline?

2016-10-16 Thread Olivier Brunel
From d01f2fe92be9d50d5592786b5aec08cabb41e001 Mon Sep 17 00:00:00 2001 From: Olivier Brunel <j...@jjacky.com> Date: Sun, 16 Oct 2016 20:38:55 +0200 Subject: [PATCH] runblock: Fix segfault Signed-off-by: Olivier Brunel <j...@jjacky.com> --- src/execline/runblock.c | 2 +- 1 file chan

emptyenv doc bug

2016-10-14 Thread Olivier Brunel
Hey, Going through some execline doc these days, and I noticed the emptyenv doc states: -o : pop environment variables starting with ELGETOPT_. You might want to do this before executing a final program from a script that uses elgetpositionals. I think this is wrong, as it should be elgetopt

Re: [PATCH] s6-supervise: Optionally run child in a new pid namespace

2017-07-15 Thread Olivier Brunel
On Sat, 15 Jul 2017 20:24:25 + "John O'Meara" wrote: > You can achieve a PID namespace (and others) using the unshare > program from util-linux without patching s6. Put the following at the > top of your run script: > > unshare -fp --mount-proc > > this also has

Re: [PATCH] Fix openreadnclose failing if errno was nonzero before

2017-05-22 Thread Olivier Brunel
On Mon, 22 May 2017 00:44:28 + "Laurent Bercot" wrote: > Does this bug manifest in serious ways, for instance making a s6 > program > fail when it should not? If it does, I'll need to release a new > skalibs version just for this >.> I didn't notice it from a s6

[PATCH] Fix openreadnclose failing if errno was nonzero before

2017-05-21 Thread Olivier Brunel
Signed-off-by: Olivier Brunel <j...@jjacky.com> --- src/libstddjb/openreadnclose.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstddjb/openreadnclose.c b/src/libstddjb/openreadnclose.c index aa61ece..39bb3b9 100644 --- a/src/libstddjb/openreadnclose.c +++ b/src/lib

s6-envdir bug/behavior change

2017-05-21 Thread Olivier Brunel
Hey, Not sure if this was intended or not, but the latest s6-envdir has some behavior change that at the very least would need to be documented: Doc says that "s6-envdir reads files in DIR"; And before, if DIR contained one or more directories they were simply ignored. Now however, it will fail

Re: [announce] mdevd-0.0.1.0 - a mdev-compatible uevent manager

2018-01-09 Thread Olivier Brunel
First off, about the buffer issue, I'm not sure why but I couldn't reproduce it. :/ Rebooted a few times, with the default buffer, and mdevd-netlink never complained. I still have the old messages in my logs, it happened every single reboot, and not once this time don't know. Maybe I'll try

Re: [announce] mdevd-0.0.1.0 - a mdev-compatible uevent manager

2018-01-08 Thread Olivier Brunel
Hey there :) So I've been using this (instead of your old uevent handler & busybox's mdev) for a little while now, works great; Thanks! I do have a few questions though. Originally what I had done was to start mdevd, run mdevd-coldplug (referred to as coldplug thereafter), and then start

Re: [announce] mdevd-0.0.1.0 - a mdev-compatible uevent manager

2018-01-08 Thread Olivier Brunel
On Mon, 08 Jan 2018 19:31:17 + "Laurent Bercot" wrote: > >But, it seems to me that when you're talking about this you expect > >one to have two different instances of mdevd, one for netlinkd & > >another one > >for coldplug. That's not how I made things however:

Re: [announce] mdevd-0.0.1.0 - a mdev-compatible uevent manager

2018-01-10 Thread Olivier Brunel
On Wed, 10 Jan 2018 00:35:33 + "Laurent Bercot" wrote: > Question that may help: > - does your /sys/devices/pci:00/:00:01.0/:01:00.1 > directory contain a "dev" file: before you manually trigger the add? > afterwards? Nope, afraid not; neither before

Re: [announce] mdevd-0.0.1.0 - a mdev-compatible uevent manager

2018-01-15 Thread Olivier Brunel
On Mon, 15 Jan 2018 11:39:19 + "Laurent Bercot" wrote: > The change is obviously incompatible with mdevd-0.0.1.0. It appears > to work for me, but please test it - especially Olivier who was > missing events with the old coldplug. If no problems are found, I'll >

avltree / genalloc

2018-04-12 Thread Olivier Brunel
ks for the help! Cheers, >From c9d5bb194408f22db8ef859203f28c6748e78ab9 Mon Sep 17 00:00:00 2001 From: Olivier Brunel <j...@jjacky.com> Date: Thu, 12 Apr 2018 18:05:14 +0200 Subject: [PATCH] Fix avltree_deletenode Signed-off-by: Olivier Brunel <j...@jjacky.com> --- src/include/skalibs/avltree.h | 2

Re: avltree / genalloc

2018-04-12 Thread Olivier Brunel
Many thanks for the explaination/clarifications! > avltree_iter isn't meant to perform operations that modify the > structure > of the tree. It *may* work, but there's no guarantee it will - and > typically, if you modify the tree, later values for node height will > certainly be incorrect.

Re: avltree / genalloc

2018-04-13 Thread Olivier Brunel
> Then genalloc is indeed the right data structure from you, but > I don't have helpers to arbitrarily remove an object in the middle. > Note that if you don't need index stability, it's trivial, and O(1): > you can just overwrite the ith object with the (n-1)th, and decrement > the length. No