Re: Bugs with execline/s6 documentation and skalibs functions using posix_spawn()

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Tue, 27 Jun 2023 08:50:35 +0000

>* In `trap.html', there is a reference to the removed `timeout' keyword.

  Fixed.


>* In `s6-svscan-not-1.html', the systemd unit (traumatic experience with
> it, as you may easily expect) lacks a `KillMode = process'.

  I believe the correct setting is actually KillMode=mixed; and the
ExecStop= line is incorrect as well since ExecStop expects a synchronous
command, not an asynchronous one. Better let systemd just send a SIGTERM
to s6-svscan, wait for the supervision tree to exit on its own, and
SIGKILL the stragglers. I pushed a fix accordingly.


>* The child_spawn*() family of functions, depending on using posix_spawn
> or not, exhibit different behaviours on CentOS 7 (trauma again), as
> posix_spawnp() may return 0 with argv pointing to unexecutable paths.
> This, for example, results in s6-svscan not exiting on SIGTERM when
> .s6-svscan/SIGTERM is absent. The behaviour of posix_spawnp() on
> CentOS 7 does not conform to posix_spawn(3p), but is documented in
> posix_spawn(3): "Even when these functions return a success status,
> the child process may still fail for a plethora of reasons related to
> its pre-exec() initialization. In addition, the exec(3) may fail."

  Yeah, well, tough for non-conforming systems.
  That said, I also pushed a change last week that should have fixed
this issue as a side effect, so it's all good. If you feel like it,
you can try the s6-svscan version in the latest s6 git. :)


> --with-sysdep-devurandom

  Also fixed.

  Thanks a lot for these reports!

--
  Laurent
Received on Tue Jun 27 2023 - 10:50:35 CEST

This archive was generated by hypermail 2.4.0 : Tue Jun 27 2023 - 10:51:06 CEST