script(1) broken on 7.4 - bin/146189 - r207453 fixes
Bryan Drewery
bryan at shatow.net
Wed May 30 01:17:02 UTC 2012
On 5/27/2012 10:06 PM, Bryan Drewery wrote:
> Hi,
>
> As reported in bin/146189, script(1) was returning the wrong exit status
> sometimes.
>
> The PR says that script(1) was broken by r205008/r205635, neither of
> which are in 7-stable or releng/7.4. Yet it is broken on 7.4.
>
> This is easily seen on 7.4:
>
> # script -q /dev/null false; echo $?
> 1
> # script -q /dev/null false; echo $?
> 1
> # script -q /dev/null false; echo $?
> 0
> # script -q /dev/null false; echo $?
> 1
> # while true; do script -q /dev/null false && echo $? && break; echo
> $?; done
> 1
> 1
> <..snip..>
> 1
> 0
>
> r207453 was MFC'd to 8-stable at the time, but not 7-stable, likely due
> to the changes attributed to causing the issue not having been on 7-stable.
>
> I am not entirely sure *how* script(1) broke on 7.4, but I have tested
> r207453 on 7.4 and found that it Works For Me.
>
> FWIW, could someone please MFC this to 7-stable?
>
> The reason I ran into this is I am maintaining portupgrade, and working
> on ports/147242 and ports/131111. Both of which seem to be due to
> script(1) returning the wrong exit status.
>
> 7.x is EoL Feb 2013 [1]. Given that, and that script(1)'s return code
> cannot be relied on for automated scripts. I am wondering what the
> thoughts are on putting this patch out as an errata?
>
> Regards,
> Bryan Drewery
>
> [1] http://www.freebsd.org/security/
>
It was reported to me that this is broken at least as far back as 4.7.
I think the changes attributed in bin/146189 just made it come to light
quicker.
Still would be nice if this was MFC'd to 7-STABLE.
Regards,
Bryan Drewery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120530/4ec9c2f3/signature.pgp
More information about the freebsd-hackers
mailing list