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

From: Laurent Bercot <>
Date: Wed, 28 Jun 2023 01:33:57 +0000

>Actually I copied the fragment of posix_spawn(3) from a Devuan Chimaera
>machine, so the problem may be not specific to CentOS 7. I did not test
>CentOS 6 or other distro (version)s, for example; but on Rocky Linux 8,
>which I unfortunately also need to support at work, the behaviour is
>as expected. Attached is a simple test.

  It may be a bug in some old glibc, then.

>If we assume posix_spawn(3) and posix_spawn(3p) were the only possible
>behaviours (which is frankly not that reliable, judging from how
>neither manpage noted the violation of conformance), then the two
>behaviours could be distinguished with the attached test.

  They're not the only possible behaviours: for instance, [1] shows that
under some buggy qemu, posix_spawn() always returns early. But that
behaviour can also be caught by the same workaround as the glibc
behaviour you're observing, so it's fine.

  Since the bug is more widespread than "one old version of one distro",
is visible in production environments used at large, and seems
to "posix_spawn succeeds even if exec fails", which is testable,
I'll add a sysdep to detect it and a workaround in child_spawn*, but it
will mean additional manual --with-sysdep-foobar=blah noise for
skalibs cross-builds.


Received on Wed Jun 28 2023 - 03:33:57 CEST

This archive was generated by hypermail 2.4.0 : Wed Jun 28 2023 - 03:34:25 CEST