[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61095: possible misuse of posix_spawn API on non-linux OSes
From: |
Omar Polo |
Subject: |
bug#61095: possible misuse of posix_spawn API on non-linux OSes |
Date: |
Fri, 31 Mar 2023 19:45:55 +0200 |
User-agent: |
mblaze/1.2 |
On 2023/03/30 22:21:28 +0200, Josselin Poiret <dev@jpoiret.xyz> wrote:
> Hi Ludo,
>
> Ludovic Courtès <ludo@gnu.org> writes:
>
> > Coming next is an updated patch series addressing this as proposed
> > above. Let me know what y’all think!
> >
> > I tested the ‘posix_spawn_file_actions_addclosefrom_np’ path by building in:
> >
> > guix time-machine --branch=core-updates -- shell -CP -D -f guix.scm
>
> I didn't test, but this LGTM! Maybe someone on OpenBSD could test this
> patchset?
% gmake check
<snip />
gmake[5]: Entering directory '/home/op/w/guile/test-suite/standalone'
PASS: test-system-cmds
it seems to work on OpenBSD 7.3 :)
but note that our libc doesn't have posix_spawn_file_actions_addclosefrom_np,
so this is using the "racy" code path.
Just for curiosity, as it's outside the scope of the bug, what's the
reason posix_spawn was used instead of a more classic fork() +
closefrom()?
Thanks,
Omar Polo