[PATCH v4 0/6] Optimize posix_spawn signal setup with clone3

H.J. Lu hjl.tools@gmail.com
Tue Feb 28 19:07:55 GMT 2023


On Tue, Feb 28, 2023 at 10:16 AM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 28/02/23 15:09, Florian Weimer wrote:
> > * H. J. Lu via Libc-alpha:
> >
> >> On x86-64, I am getting
> >>
> >> error: tst-spawn7.c:55: not true: sa.sa_handler == SIG_DFL
> >> tst-spawn7.c:91: numeric comparison failure
> >>    left: 1 (0x1); from: WEXITSTATUS (status)
> >>   right: 0 (0x0); from: 0
> >> error: tst-spawn7.c:55: not true: sa.sa_handler == SIG_DFL
> >> tst-spawn7.c:91: numeric comparison failure
> >>    left: 1 (0x1); from: WEXITSTATUS (status)
> >>   right: 0 (0x0); from: 0
> >> error: tst-spawn7.c:71: not true: sa.sa_handler == SIG_DFL
> >> tst-spawn7.c:91: numeric comparison failure
> >>    left: 1 (0x1); from: WEXITSTATUS (status)
> >>   right: 0 (0x0); from: 0
> >> error: tst-spawn7.c:55: not true: sa.sa_handler == SIG_DFL
> >> tst-spawn7.c:91: numeric comparison failure
> >>    left: 1 (0x1); from: WEXITSTATUS (status)
> >>   right: 0 (0x0); from: 0
> >> error: 4 test failures
> >> FAIL: posix/tst-spawn7
> >>
> >> with
> >>
> >> $ make check -j12
> >>
> >> But it passes when I run it by hand.  Is this expected?
> >
> > I see it as well, but it's not consistent for me, either.  Could it be a
> > make bug, leaking unusual handler dispositions in some cases?  The test
> > should probably check that the disposition are as expected at the start,
> > and not incorrect to begin with.
>
> Right, it makes sense. I will add some improvement to have a consistent signal
> handling disposition prior spawn the tests processes.

In all cases, sa.sa_handler was SIG_IGN while SIG_DFL was expected.

-- 
H.J.


More information about the Libc-alpha mailing list