NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/60275 (sh(1): race condition in signal handling on background subshell fork)
Synopsis: sh(1): race condition in signal handling on background subshell fork
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: kre%NetBSD.org@localhost
State-Changed-When: Fri, 22 May 2026 02:59:18 +0000
State-Changed-Why:
[pullup-11 #294]
This is the only pullup I am going to request. It turns out that -10
is missing other (not all that important) fixes that would require
using patches to pullup this fix. While that would be possible (not
all that hard either), the other missing fixes are at least as likely
to be an issue as this one is (probably more), and though they've
never been made there, they don't bother anyone in practice, nor
will this fix being absent.
If the patches won't apply easily to -10, they certainly won't to -9
so I'm not even going to bother to look.
FWIW, I checked a bunch of other shells, many fail the "bug.sh" test,
including our /bin/ksh, pdksh, dash, mksh, the FreeBSD sh, bosh and zsh
(the latter two with different behaviour, but all those print "timeout").
Only bash, yash, and ksh93 (of the shells I generally test against, which
is most that matter these days) succeeded (as does our sh from HEAD, and
as will the one in -11 after pullup #294 is processed).
That I believe gives an indication just how rare actually encountering
the problem exposed by the PR actually is.
[Aside: my FreeBSD sh test used a FreeBSD shell from several years back,
but I spent a little time browsing their current sources, and there is
certainly no fix for this issue incorporated. Some of the versions of
the other shells I tested are slightly out of date as well, but not nearly
as far, and I doubt that is likely to have made any difference.]
Also note, to be tested against other shells, the line "trap -" (reset all
traps to default) needed to have the traps to reset appended (the same
set that are trapped) as "trap -" isn't standard sh syntax, though it is
very useful. In the standard, any trap with an action (which includes '-'
and '') requires a list of conditions to apply that action to.
Home |
Main Index |
Thread Index |
Old Index