Re: [announce] s6-rc: a s6-based service manager for Unix systems

2015-09-24 Thread Laurent Bercot
On 24/09/2015 04:54, Avery Payne wrote: 1. Copy the entire contents of the svcdef/ directory into the s6 source definition directory, including dot file support directories. There is no room in the source definition directory for a support directory as svcdef/ ; I mean, you can put it

Re: [announce] s6-rc: a s6-based service manager for Unix systems

2015-09-24 Thread Laurent Bercot
On 24/09/2015 18:45, Avery Payne wrote: This is probably the only real problem in the arrangement I'm using then. The entire premise is "the support scripts live where the definitions live and are called with relative pathing, allowing the definitions to be located anywhere". My point of

Re: [announce] skarnet.org Fall 2015 update

2015-09-24 Thread Laurent Bercot
On 25/09/2015 03:18, Guillermo wrote: Reading the documentation, I couldn't tell the difference between these and the -wu and -wU options. Looking at the code, -r seems to mean "wait for a D event, and then for an u event", and -R seems to mean "wait for a D event, and then for an U event". Is

[announce] skalibs-2.3.9.0, s6-2.2.4.3

2016-01-08 Thread Laurent Bercot
Hello, skalibs-2.3.9.0 is out. Two more functions: bitarray_firstclear_skip and bitarray_firstset_skip. Also a bugfix. http://skarnet.org/software/skalibs/ git://git.skarnet.org/skalibs s6-2.2.4.3 is out. It fixes a bug where s6-ftrigrd could crash if a client unsubscribes from a

Re: Running & interrupting s6-svscan in terminal

2016-06-04 Thread Laurent Bercot
On 04/06/2016 19:06, Remko Tronçon wrote: When s6-svscan is running in a terminal, and I hit Ctrl-C, the processes managed by s6 are not interrupted, and remain running after s6-svscan has quit. I'm guessing this has something to do with CTRL-C behavior wrt process groups, but I'm not

Re: s6-rc-update do not bring up services

2016-06-04 Thread Laurent Bercot
On 04/06/2016 08:14, Eric Vidal wrote: The test is simple, i create a database with all i need. I create a second database with the same service less one. When i update the live database from first to second, all is good, s6-rc-update bring down the service which doesn't exit. But when i update

Re: s6-log error

2016-05-25 Thread Laurent Bercot
On 25/05/2016 16:52, Eric Vidal wrote: Hi, i have a strange error message on catch-all logger when my "rc" service start, i have this following line amount : @40005745b6800cfc8fe4 s6-log: fatal: unable to lock_exnb /var/log/syslogds6/error/lock: Resource temporarily unavailable This

Re: multiple scandir and rc database

2016-06-13 Thread Laurent Bercot
#!/usr/local/bin/execlineb -P If you're a distributor: don't do that. Distributions should not install anything in /usr/local. Also, if you're providing s6 as the base init system, you should have the execline binaries in the root filesystem, which means /bin. Because the user may choose to

Re: multiple scandir and rc database

2016-06-13 Thread Laurent Bercot
On 13/06/2016 16:50, Eric Vidal wrote: I totaly agree with you but i do not have the choice, you import program is in conflict with import from imagemagick. So, under Archlinux system (i'm based on it) the bin directory is a symlinks to /usr/bin. You totally have the choice. Install it with

Re: Execlineb scripts on systems with conflicting binaries

2016-05-27 Thread Laurent Bercot
On 27/05/2016 13:25, Eric Vidal wrote: You put me doubt. If my environment PATH is declared as it : PATH=/usr/bin:/usr/local/bin, the first import program taken is /usr/bin/import, not? i'm wrong? If PATH=/usr/bin:/usr/local/bin then "import" will *always* refer to /usr/bin/import, and you

Re: Execlineb scripts on systems with conflicting binaries

2016-05-27 Thread Laurent Bercot
On 27/05/2016 13:17, Remko Tronçon wrote: The wrapper sounds like the best solution in my case I explicitly did not list it as a solution, and I kindly ask you not to do that. You are effectively removing execline binaries from PATH, which amounts to execline not really being installed on

Re: Execlineb scripts on systems with conflicting binaries

2016-05-27 Thread Laurent Bercot
On 27/05/2016 12:53, Eric Vidal wrote: I have installed execline at /usr/local/bin and the rest of s6 sofware at /usr/bin. Works like a charm. It works as long as nothing expects ImageMagick's import to be accessible via PATH search. If a program makes that assumption, it will break. --

Re: Execlineb scripts on systems with conflicting binaries

2016-05-27 Thread Laurent Bercot
On 27/05/2016 12:31, Remko Tronçon wrote: Some of the 'built-in' binaries of execline conflict with binaries that already exist on the system. As far as I'm aware of, it's only import. Are there other binaries that conflict with other packages? For example, on a system with imagemagick

Re: s6-log error

2016-05-27 Thread Laurent Bercot
On 27/05/2016 06:59, Eric Vidal wrote: Creating a fifo file than having a s6-log watching on it? This. Anonymous pipes won't work here because you'd need to control a common ancestor to the processes you want to pipe. But named pipes do not have that requirement. - Create a fifo somewhere

Re: backtick to NOT set variable

2016-06-18 Thread Laurent Bercot
Sorry it took so long. Please try the -I option to backtick and withstdinas in the latest execline git and tell me if it works for you. -- Laurent

Re: target mismatch building on different versions of darwin

2016-02-27 Thread Laurent Bercot
On 27/02/2016 17:01, Patrick Mahoney wrote: Another might be to patch the ./configure script to strip off any darwin version number from the output of `-dumpmachine`. It's quite easy to do this within the nix packages of skalibs, etc. without any need to modify skalibs upstream. Wondering if

Re: how do I start the "catch-all-logger"

2016-02-27 Thread Laurent Bercot
On 28/02/2016 00:38, Terrel Shumway wrote: I see many references to a catch-all-logger but I don't see any instructions on how to start it or use it. Try running s6-linux-init-maker: http://skarnet.org/software/s6-linux-init/s6-linux-init-maker.html and studying what it's doing. The

Re: running s6-rc as unpriviledged user

2016-02-27 Thread Laurent Bercot
On 28/02/2016 00:25, Terrel Shumway wrote: sv/wm/run execs dwm sv/xterm/run execs x-terminal-emulator (running xterm supervised is fun) sv/xserver/run execs the X server (Xephyr for testing) sv/ssh-agent/run execs ssh-agent in non-daemon mode Your problem here is user discrepancy. xserver

Re: target mismatch building on different versions of darwin

2016-02-28 Thread Laurent Bercot
On 28/02/2016 17:21, Guillermo wrote: ./configure --target=x86_64-apple-darwin13.4.0 --with-sysdeps=whatever/skalibs/sysdeps That would work too, but then the same target should be given to compile every package that uses skalibs. It's as cumbersome as if you were cross-compiling, even though

Re: Problem with fdmove

2016-02-15 Thread Laurent Bercot
On 15/02/2016 10:55, Jan Olszak wrote: The fdmove 1 3 operation shouts: fdmove: fatal: unable to move fd 3 to fd 1: Bad file descriptor That means fd 3 is not open. You need to have a notification-fd file that contains "3". If I comment this line out everything's OK. But I lose the

Re: Problem with fdmove

2016-02-15 Thread Laurent Bercot
On 15/02/2016 11:30, Jan Olszak wrote: I do have a notification-fd file: What does it contain? To work with the stock syslogd-linux/run script, it should contain 3. When is notification-fd opened? It is read by s6-supervise when the service starts. s6-supervise creates a pipe, and

Re: s6-log run script

2016-03-02 Thread Laurent Bercot
On 02/03/2016 23:52, Jan Olszak wrote: #!/usr/bin/execlineb -P if -nt { backtick -n S6_LOG_ARGS { redirfd -r 0 /opt/s6logargs.opts s6-cat } import -u S6_LOG_ARGS s6-log T $S6_LOG_ARGS } s6-log T s100 n10 /var/log/syslogd That won't work for several reasons: *

Re: s6-log run script

2016-03-04 Thread Laurent Bercot
On 04/03/2016 23:15, Jan Olszak wrote: But what if I need to fallback if the arguments are malformed? I'd argue this is not a good idea. Arguments to a logging script are not user data, they are admin-controlled data that impacts the working of your system. They should be validated before

Re: Booting, s6-rc services and controlling terminal

2016-04-02 Thread Laurent Bercot
Consider a machine with an s6-linux-init-maker-style setup, that also uses s6-rc in the stage2 and stage2_finish scripts. Longruns managed by s6-rc without a 'producer-for' file in their definition directory have their stdout and stderr redirected to the catch-all logger, and so do oneshots via

Re: Compilation issue

2016-04-27 Thread Laurent Bercot
On 27/04/2016 16:37, Luis Ressel wrote: Go ahead and install the skarnet stuff to /usr/local. You'll just have to be careful that execline scripts are always executed with PATH=/usr/local/bin:/usr/local/sbin:... . Not only execline scripts, but mostly everything that calls s6 binaries. s6

Re: Compilation issue

2016-04-27 Thread Laurent Bercot
On 27/04/2016 11:21, Eric Vidal wrote: i try to compile skalibs and execline package with --enable-slashpackage options set to s6 for me. Hi Eric, The argument to --enable-slashpackage, if any, must be an *absolute* directory, and one shared by every skarnet.org package you compile

Re: Booting, s6-rc services and controlling terminal

2016-04-30 Thread Laurent Bercot
On 30/04/2016 16:06, Guillermo wrote: I think I made a mistake in that description. The s6rc-oneshot-runner service is an s6-ipcserverd process that spawns s6-sudod processes. And the program executed by s6-sudod gets its stdout and stderr from the corresponding s6-sudoc process by default.

Re: "ifthen" for more "dynamic" argv manipulation

2016-05-24 Thread Laurent Bercot
ifthen { s6-test -n ${DISCARD_ENV} } { exec -c } prog1 Ah, the lure of magic scoping. I know. I felt it too. If you want to experiment with it, try with the undocumented -s option to ifthenelse: it's exactly what it does. ifthenelse -s { testprog } { trueprog } { falseprog } args... will

Re: Documentation feedback: surprising behavior of null substitutes

2016-05-20 Thread Laurent Bercot
On 20/05/2016 17:42, Max Ivanov wrote: Docs on 'importas' specify that missing env var without a default value would produce a "null arg", however nowhere else term "null arg" is used or described (including very important "el_substitute" document), which lead to a surprising result at least for

Re: backtick to NOT set variable

2016-05-20 Thread Laurent Bercot
On 18/05/2016 13:42, Max Ivanov wrote: can backtick (or combination of other scripts commands) can be to NOT set env var on error? I'm pretty sure that any case can be achieved with the current behaviour, but I agree that ugly contorsions are necessary for more than one case, so I'm ok to

Re: [PATCH] bitarray_not: Fix skipping a byte

2016-05-14 Thread Laurent Bercot
On 15/05/2016 00:24, Olivier Brunel wrote: -for (; i < (b>>3) - 1 ; i++) s[i] = ~s[i] ; +for (; i < (b>>3) ; i++) s[i] = ~s[i] ; Ouch! Thanks. -- Laurent

Re: -o remount,ro /

2016-05-13 Thread Laurent Bercot
On 13/05/2016 13:36, Eric Vidal wrote: This is the case, the live directory is on run with tmpfs type and this option : mode=0755,nosuid,nodev In the stage 1 script you listed, I can't find a mount instruction for /run. If you are running that stage 1 script verbatim, you are making /run/s6

Re: -o remount,ro /

2016-05-13 Thread Laurent Bercot
On 13/05/2016 16:34, Eric Vidal wrote: i forgot : what puzzle me, if i do this in console (so i'm on tty1 just after the booting ) : mount -o remount,ro / all works fine without trouble Got it. When you run s6-rc, it takes a lock on the database. However, if the database is on a

Re: -o remount,ro /

2016-05-13 Thread Laurent Bercot
On 13/05/2016 18:41, Eric Vidal wrote: i have made it. It works yes, but if i want a service like syslogd-linux (or any other service which need to read/write on /) started at the end of the init script by s6-svcscan with the / mounted on ro, the syslogd service fail, because it can write the

Re: backtick to NOT set variable

2016-05-18 Thread Laurent Bercot
On 18/05/2016 13:42, Max Ivanov wrote: can backtick (or combination of other scripts commands) can be to NOT set env var on error? Not if it succeeds. However, backtick -i will exit on error: you can use that difference in program flow to create the sequence you need. backtick -n

Re: s6-supervise behaviour

2016-05-05 Thread Laurent Bercot
On 05/05/2016 13:19, Eric Vidal wrote: So i have a questions about s6-supervise behaviour. Well, i have 2 tty running, i logged on X from tty1. I kill the s6-supervise pid for tty2. Well, as expected, tty2 restarts. I do the same thing for tty1, obviously the X crash :), but tty1 never restarts.

Re: bash < execline > bash

2016-05-01 Thread Laurent Bercot
On 01/05/2016 12:26, Eric Vidal wrote: One more question, my knowledge is not sufficient to understand this following command : unexport ? i'm not understand the ? here ? is the environment variable set by the "foreground" command. It holds the exit code of the command run in the foreground

[announce] Spring 2016 release

2016-04-14 Thread Laurent Bercot
Hello, New release of skarnet.org packages are available, with a few significant changes. * General --- skarnet.org packages now support the GNU configure convention of using --host=HOST for cross-compiling; the --enable-cross option is not used anymore. The CROSS_COMPILE variable

Re: Inteligent service restart with s6

2016-07-25 Thread Laurent Bercot
On 25/07/2016 14:55, Jan Olszak wrote: Oh, I didn't know about ./finish. Thanks! http://skarnet.org/software/s6/s6-supervise.html tells you how to get ./run's exit code and crash signal in ./finish. The idea with a separate watchdog is tempting.. Is it possible to use variables stored in

Re: Set binprefix when not using slashpackage

2016-08-02 Thread Laurent Bercot
On 2016-08-02 05:46, Patrick Mahoney wrote: The Nix package manager is similar to slashpackage in that a given version of s6 lives within a single directory (e.g. commands can be found in /nix/store/$hash-s6-$version/bin/s6-*), however it does not follow the

Re: Set binprefix when not using slashpackage

2016-08-03 Thread Laurent Bercot
On 2016-08-03 04:08, Patrick Mahoney wrote: Yes, but not in the way slashpackage does. Now that I understand what these constants are for, it's clear that EXECLINE_BINPREFIX and EXECLINE_EXTBINPREFIX should be defined to point to the same absolute bin directory of a specific Nix package of

Re: Some glitches on skarnet.org

2016-08-11 Thread Laurent Bercot
On 11/08/2016 14:19, Casper Ti. Vector wrote: * On , `Alternatively, you can checkout a copy of the skalibs "git repository' (yes, the double quote `"' is incorrect). Fixed, thanks. * On the cgit web interface, for example

Re: Some glitches on skarnet.org

2016-08-13 Thread Laurent Bercot
On 13/08/2016 11:01, Casper Ti. Vector wrote: Just one more request: would you like to enable, even if optionally, HTTPS on skarnet.org? There are clients for letsencrypt [1] that only use bash, so python (which you seem to really dislike :) will never get in the way. Yes, it's something

Re: Some glitches on skarnet.org

2016-08-13 Thread Laurent Bercot
On 13/08/2016 13:26, Casper Ti. Vector wrote: A shameless plug: might be of some help in understanding the protocol. The script (169 SLOC as of now) is not be directly usable to you since it is written in python, but I tried quite hard to make the

Re: skalibs: how to properly detect posix_spawnp() when using uclibc-ng?

2016-08-12 Thread Laurent Bercot
On 12/08/2016 12:23, Laurent Bercot wrote: I need a more invasive patch. Going to work on it. That was painful. Eric: please test the current git versions of the whole skarnet.org stack (compatibility's broken with the previous versions, next release will have major version bumps) and tell

Re: Set binprefix when not using slashpackage

2016-08-06 Thread Laurent Bercot
On 2016-08-06 05:34, Patrick Mahoney wrote: I'll hopefully have time to work on this in the coming days. Not sure what best to call the option. --enable-nix seems too specific. The Guix packager may not realize it yet, but Guix needs this option as well (it is based on Nix). "Naming is hard"

Re: Set binprefix when not using slashpackage

2016-08-02 Thread Laurent Bercot
On 2016-08-02 19:41, Patrick Mahoney wrote: Yes, the absolute path will be stable. This could be set at configure time and would never change. Let me repeat/rephrase my question: will it also be true if the package, or a dependency of the package, gets updated? With slashpackage, say for the

Re: s6-linux-init, alpine linux, and initramfs

2017-01-31 Thread Laurent Bercot
I had to mount /dev and to resort to busybox's switch_root because the one built using execline tools had trouble executing. Despite using executables from the actual root filesystem, it had issue spawing tools at some point in the loop. I guess this is because they are not statically

Re: s6-rc compilation issue

2017-01-24 Thread Laurent Bercot
This can be fixed be creating a symlink : ln -s /usr/local/stow/skarnet/lib/s6/libs6.a /usr/local/stow/skarnet/lib/libs6.a No, this is intentional. The skarnet.org build system installs static libraries in a subdirectory of $prefix/lib by default, as shown in the output of ./configure

skalibs will soon change APIs

2017-01-30 Thread Laurent Bercot
Hello, This is a heads-up for people who are using skalibs, or any of the libraries in the skarnet.org projects (which are undergoing the same transformation). Since the beginning, skalibs has used ints and unsigned ints about everywhere in its prototypes. This is legacy from DJB, and comes

Re: s6-rc:

2017-01-28 Thread Laurent Bercot
By the way, is the blocking behavior of fifos part of POSIX ? It's Complicated (tm). Roughly yes. The important parts, i.e. how open(fifo, O_WRONLY) and write() should behave when there's no reader, are specified by POSIX, so the behaviour is perfectly safe. For our use case of using fifos

Re: s6-rc:

2017-01-27 Thread Laurent Bercot
# Precreate the control FIFO s6-mkfifo -m 0600 $S6_SCANDIR/.s6-svcan/control background { if { # Block until s6-svscan starts reading its control FIFO redir -w 8 $S6_SCANDIR/.s6-svcan/control # Do not leak the fd fdclose 8

Re: Configuration and scripts location

2017-02-22 Thread Laurent Bercot
Tweaking my services, I have wondered where to put their configuration. Choose a place for configuration directories that is entirely independent from your s6/s6-rc installation, typically in /etc. Put your configuration there and address it via absolute paths. For oneshots, it's the only

Re: s6-tcpserver

2017-02-24 Thread Laurent Bercot
i've try the command line : s6-tcpserver -v -4 0.0.0.0 2121 /usr/bin/stupid-ftpd stupid-ftpd has no inetd mode. It binds and listens to its socket itself: in other words, it's not suitable to run under s6-tcpserver. s6-tcpserver only works with servers that do not listen to the network

Re: buffer usage

2016-08-24 Thread Laurent Bercot
static int listener_read(int fd, siovec_t const *io, unsigned int nb) You should not be using a siovec_t and fiddling with fd_readsv if your goal is to use the buffer.h API. siovec_t is used in the *implementation* of the buffer primitives (because the buffer.h buffers are now circular) but

Re: buffer usage

2016-08-25 Thread Laurent Bercot
OK, now I understand what you're doing. You're declaring a buffer with your own function (listener_read) as a reading function. ... Don't do that. Just declare your buffers with the standard buffer_read function (which is an alias to fd_readsv), it will make your life a lot easier. But I

Re: Set binprefix when not using slashpackage

2016-09-11 Thread Laurent Bercot
On 10/09/2016 21:31, Patrick Mahoney wrote: Thoughts? - exit 1 +# exit 1 What was your problem with that? The weird Darwin thing where they hardcode the OS release number in the compiler's triple, and configure reported a spurious mismatch? I'm of two minds here. On the one hand, I

Re[4]: Building in Yocto with sysroot (and migrating from skalibs 2.3.8 to 2.3.10)

2016-09-27 Thread Laurent Bercot
Looks great! Thanks! Applied to the current git heads, thanks for the bug-report :) Please note that the next mass skarnet.org release will probably occur during the second half of October (or early November at worst). The major version numbers will be bumped, which means compatibility

Re: Building in Yocto with sysroot (and migrating from skalibs 2.3.8 to 2.3.10)

2016-09-27 Thread Laurent Bercot
Does the attached patch fix things for you? If it does, I will apply it to all the skarnet.org stack. -- Laurent

Re[2]: Building in Yocto with sysroot (and migrating from skalibs 2.3.8 to 2.3.10)

2016-09-27 Thread Laurent Bercot
Sigh. My new e-mail client doesn't want to send .patch files as text/plain. Trying again... -- Laurentdiff --git a/configure b/configure index 0b690fc..55136cc 100755 --- a/configure +++ b/configure @@ -82,7 +82,7 @@ cmdexists () { } trycc () { - test -z "$CC_AUTO" && cmdexists "$1" &&

Re: [announce] Fall 2016 release

2016-10-28 Thread Laurent Bercot
I believe there was also a "-s" option added to execlineb ;) Indeed there was! Sorry for the omission, and thanks for the contribution :) -- Laurent

Re: Some glitches on skarnet.org

2016-10-29 Thread Laurent Bercot
Found this just now: : pure C, no python or shell; developed by the OpenBSD people and already included in OpenBSD, which at least makes the code not smell very insecure :) Yes! I've been told about acme-client. I'll definitely have a look at it when

Re[2]: How to write an execline helper in execline?

2016-10-16 Thread Laurent Bercot
Had a quick look, and from what i could gather the issue is that in our case, nothing gets put into v, so by the time pathexec_run() gets called, v only contains a NULL Oh yeah, it was definitely that, but the hard part was figuring out exactly where the off-by-one error was among all the

Re[4]: How to write an execline helper in execline?

2016-10-16 Thread Laurent Bercot
Hi, slightly among the lines of this suggestion, is there anything to help templating files with a given set (or subset) of env vars? This would be nice addition for s6 overlay I can't think of anything simpler than s6-envdir dir_containing_all_variable_definitions multisubstitute { import

Re[2]: Set binprefix when not using slashpackage

2016-10-16 Thread Laurent Bercot
I just added something similar to the skarnet.org configure scripts (except for skalibs which doesn't export binaries): the option is named --enable-absolute-paths. Patrick, can you please test it and tell me if it does what you want? I also scrapped all the /sbin stuff and sbindir. Now

[announce] skalibs-2.4.0.2, s6-networking-2.2.1.0 - now with secure connections!

2016-12-04 Thread Laurent Bercot
Hello, New releases of the following packages are available: * skalibs-2.4.0.2 --- Bugfix release. It is necessary to upgrade to this release for the new version of s6-networking to work. http://skarnet.org/software/skalibs/ git://git.skarnet.org/skalibs *

Re: [announce] skarnet.org Spring 2017 release

2017-03-28 Thread Laurent Bercot
* s6-2.5.0.0 -- And obviously I forgot to mention the important change for users: s6-svstat can now print programmatically parsable output, via a new "-o field" option (and shortcuts for common fields). This feature was asked for a long time ago. -- Laurent

Re: [announce] skarnet.org Spring 2017 release

2017-03-30 Thread Laurent Bercot
Laurent, there appears to be an error on the page for s6-linux-init on skarnet.org - it lists the required version of s6-portable-utils and s6-linux-utils as 2.3.0.0 and 2.4.0.0 respectively when the released versions are 2.2.0.0 and 2.3.0.0 respectively. Fixed, thanks! -- Laurent

[announce] skarnet.org Spring 2017 release

2017-03-27 Thread Laurent Bercot
Hello, New releases of the skarnet.org packages are available, with significant internal changes (if few externally visible changes). This is a major version bump for all packages: compatibility with previous versions is not guaranteed. * General --- - Support for old versions of

Re: execline: Segfault with the define program

2017-04-05 Thread Laurent Bercot
define TESTING \#testing define TESTING2 /test1/test2/test3/test4/\\${TESTING}/test6 Works for me. Please make sure you're running the latest version of execline, built against the latest version of skalibs. (execline-2.3.0.0 won't work with a version of skalibs older than 2.5.0.0.) If

Re: multidefine segfault

2017-04-11 Thread Laurent Bercot
Out of curiousity, what kind of bug was it in terms of what was happening to the memory? Out of bounds access. The -r option code does "array[i-1]", and i may be zero when the key block is empty, which should never happen but was not properly checked. So your use case triggered

Re: execline: Segfault with the define program

2017-04-05 Thread Laurent Bercot
Thanks for the report. I'm going to check the memcpy's, see if there's one that overlaps. Wow, it could even be the first time OpenBSD's quirkiness is actually *useful* to the developer. Found and fixed. Please try with the latest execline git and tell me if it solved your problem. It pains

Re: execline: Segfault with the define program

2017-04-05 Thread Laurent Bercot
Works now. Good designs are often quirky. DJB-like software is often considered quirky or even hated as well... Well, OS design isn't quite the same as software design. It's an interesting topic that I don't want to dive too deep into on this mailing-list. :) execline is awesome! OpenBSD is

Re: execline: Segfault with the define program

2017-04-05 Thread Laurent Bercot
From reading the mailing lists on this, it looks like OpenBSD detects overlapping memcpy regions, considers it a bug, and segfaults the offending program to prevent unpredictable behavior. *Of course* it had to be OpenBSD. What else? Thanks for the report. I'm going to check the memcpy's,

Re: multidefine segfault

2017-04-11 Thread Laurent Bercot
It's the second multidefine segfaulting. It does not seem to happen without '-r'. Thanks for the report! Should be fixed in the latest git, please try. You should get an error message saying "empty block" instead of a segfault. Your script is a misuse of multidefine ("$msg" expands to two

Re: Newbie question

2017-04-15 Thread Laurent Bercot
because read is builtin to sh. Is there a solution as simple as the above? Try the "forstdin" or "withstdinas" commands. -- Laurent

Re: execline misc

2017-04-16 Thread Laurent Bercot
Quick question: what happened to execline-start and execline-shell? They're still referenced on the execline index page on skarnet.org but they haven't been distributed with execline since before 2.0.0.0 (that's as far as the git history goes, but older versions can still be downloaded from

Re: Newbie question

2017-04-16 Thread Laurent Bercot
What I am trying to write, is a minimal interpreter read-eval loop, which gets its $INPUT from /dev/tty. How about this? redirfd -r 0 /dev/tty forstdin -d"\n" LINE importas -u LINE LINE execlineb -c $LINE -- Laurent

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

2017-07-16 Thread Laurent Bercot
As I told Jesse on IRC, the patch isn't going in. I'm not including OS-specific code into s6, even with a compile-time option. The main reason for it is that it changes the API: the choice to spawn the service in a new namespace or not should be made at run time, so it would introduce a new

Re: s6 documentation errors

2017-07-26 Thread Laurent Bercot
Hello, Sorry for not answering earlier, I wasn't in a place where I could send mail. I fixed the documentation, and I also fixed the s6-svscanboot example. Thanks for the reports! -- Laurent

Re: Restarting dependant services

2017-07-06 Thread Laurent Bercot
I need to ensure that if A service is down (crash or exit) all dependant B services will be restarted. In general, B processes will themselves die (and be restarted by their supervisors) if they can't find a resource that is provided by service A, so you don't need to do anything manually.

Re: Another issue on OpenBSD

2017-04-28 Thread Laurent Bercot
Now getting trap: fatal: unable to auto-trap signal 32: Invalid argument I had to specialcase it in skalibs because no other OS - not FreeBSD, not Solaris, not even MacOS - manages to add system-specific gratuitously untrappable signals. But OpenBSD does, because it can. Please recompile

Re: Another issue on OpenBSD

2017-04-27 Thread Laurent Bercot
trap: fatal: unable to auto-trap signal 9: Invalid argument Ah, BSDs, always making it convenient for developers, are we? Please try the latest execline git and tell me if it fixes the issue. -- Laurent

Re: s6-fdholder-getdumpc fails with 'Protocol error' (EPROTO)

2017-08-06 Thread Laurent Bercot
s6-fdholder-getdumpc: fatal: unable to get dump: Protocol error I can reproduce this. Thanks for the report, I'll work on understanding and fixing what's going on. -- Laurent

Re: s6-fdholder-getdumpc fails with 'Protocol error' (EPROTO)

2017-08-06 Thread Laurent Bercot
Fixed in the latest s6 git. It was a stupid typo. I'll carve a new release some time this month. -- Laurent

Re: [announce] skarnet.org Spring 2017 release: s6 init fails with buildroot on MIPS

2017-05-14 Thread Laurent Bercot
Adding support for predefined sysdeps in Buildroot should be easy. The problem is generating these predefined sysdeps for all the combinations of architectures and libc supported by Buildroot. Could all the cases be covered by using sysdeps generated with QEMU for arm, aarch64,

Re: [PATCH] libstddjb: add pathexec_run_or_die

2017-05-18 Thread Laurent Bercot
pathexec_run(a, b, c); strerr_dieexec(111, a); is a reasonably common pattern in execline programs, and since strerr_dieexec expands to a 11 argument function call (of strerr_diesys), this ends up generating a lot of code. Provide a helper to do these two calls. That's actually a pretty

Re: [announce] skarnet.org Spring 2017 release: s6 init fails with buildroot on MIPS

2017-05-13 Thread Laurent Bercot
s6-ftrigrd: fatal: unable to flush asyncout: Broken pipe I do my cross-compilation tests using QEMU and I remember having this kind of issue sometimes. I always blamed it on a race condition and a slow QEMU emulation, without looking any futher. s6-ftrigrd uses out-of-band message passing,

Re: [PATCH] execline: use pathexec_or_die

2017-05-18 Thread Laurent Bercot
In exec.c, we already win a little by doing a single call of pathexec_run instead of having each branch do their own This change is invalid. When you exit the if (dash) block, the dashed[] array goes out of scope, and is deallocated; but argv[0] is still pointing to it. The duplication of the

Re: Some glitches on skarnet.org

2017-05-23 Thread Laurent Bercot
I found HTTPS to be already supported on skarnet.org, but many links still downgrade to plain HTTP. May I request a full upgrade to HTTPS? If the answer is yes, I can provide a list of downgrading links I noted. The answer is no (I still want to provide HTTP), but I agree that downgrading is

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

2017-05-22 Thread Laurent Bercot
Just to be sure, I released skalibs-2.5.1.1, so there's a stable version with that bug fixed. -- Laurent

[announce] skarnet.org May 2017 release

2017-05-21 Thread Laurent Bercot
Hello, New releases of some skarnet.org packages are available; those are mostly bugfix releases, but some new features and one API change also made it in. * skalibs-2.5.1.0 --- - Lots of small bugfixes and improvements, mostly related to sysdeps autodetection, support for

Re: Documentation glitch for s6-uevent-listener

2017-05-28 Thread Laurent Bercot
s6-linux-utils/doc/s6-uevent-listener.html contains a broken link Shoo! Nothing to see here. No broken link to a page that may or may not exist in a close or distant future. Move along! (Thanks for the report. Fixed.) -- Laurent

Re: Problems with recent versions of s6-rc

2017-05-25 Thread Laurent Bercot
I experienced this when updating Alpine from v3.5.2 to v3.6.0 on these machines; the v3.6.0 release have already covered skalibs v2.5.1.1. Can you then please send me a strace of the failing programs? I can't reproduce. -- Laurent

Re: Problems with recent versions of s6-rc

2017-05-25 Thread Laurent Bercot
All the problems you report should be fixed with skalibs-2.5.1.1, which should already be available in Alpine. Are you still experiencing issues with skalibs-2.5.1.1 ? * Incompatibility of the compiled database: s6-rc commit 543c1405 breaks the backwards compatibility of the compiled

Re: Problems with recent versions of s6-rc

2017-05-25 Thread Laurent Bercot
Well I think pastebins really tend to be unreliable (most importantly, content disappearing at unexpected time), so small files (whether text or binary, as long as they are relevant) are best posted directly to the mail list No. When it's about debug information such as strace outputs, the

Re: Problems with recent versions of s6-rc

2017-05-25 Thread Laurent Bercot
A person on this list kindly told that no attachment appeared; but actually I *did* attach a gzip'ed version of the log as `rc-err.log.gz', so we are perhaps facing a problem with some steps in the mail delivery. It is intentional that binary attachments are stripped when sent to the list. I

Re: Problems with recent versions of s6-rc

2017-05-25 Thread Laurent Bercot
Not even in a VirtualBox VM? Seems more interesting than I thought... I hadn't tried... I cannot reproduce when compiling everything by hand on my machines, but I followed the procedure you outlined and I am indeed able to reproduce on a Virtualbox VM running the Alpine packages. The fact

Re: [PATCH] libstddjb: add pathexec_run_or_die

2017-05-18 Thread Laurent Bercot
I have added xpathexec_* functions to the latest skalibs git, and used them in the latest execline git. It doesn't change the size of static binaries, so if it reduces the size of dynamic binaries, why not. -- Laurent

Re: Using execline in place of shell for s6/s6-rc setup: environment variables?

2017-05-19 Thread Laurent Bercot
I am trying to determine whether is feasible and sane for me to try to port Slackware's init scripts that initialize such things as filesystems, kernel modules, network interfaces, etc. I would be trying to write these in execline as oneshot services to be started by s6-rc at the very

<    1   2   3   4   5   6   >