Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2012 22:06:13 -0500
From:      Bryan Drewery <bryan@shatow.net>
To:        freebsd-hackers@freebsd.org
Cc:        ed@80386.nl, brucec@freebsd.org
Subject:   script(1) broken on 7.4 - bin/146189 - r207453 fixes
Message-ID:  <4FC2EBA5.8010500@shatow.net>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPwuukAAoJEG54KsA8mwz5OqEP/38GQcmgBFRbAsNXtOfYOIO0
aPNQTNBsR6VT52VDDKxU7Ou6zL3RlVoL8A9hxlYSXjLdRLDwP6TUODSyNGlsDbSd
+o7LVN8VGEHEEflcM0lYEiQEfOhJFBwqBhvVs6Efm7USKwnumGfTnLnkMTXDzwtb
RoTQnJDh8wv219Tg71f/RoBhemY6da0Rr7teOB99q22guIc8ao2fnTTcpvhJtg1b
l6WwN9O41MQNy3mniC9B0JdxU4Nl8/KQg1PHQMfUR+Q+L0OPcXXSW20NqzmTT41/
RcC4xINgX/y6OHOt3YcVTIKvclwUKxgPYXrIspfEltnwKHpm3SP+gV0O4MLcYTyQ
kZkQSA/vIaVRCNY90jwRFa7Pmxj4u7Fqh2l0Cxh87XC2l2JvUtXm/u+bbegJRWzp
M27LUjm6FArvC6SNpn3wEWCaY7J7o8fFLTZTMA2PcU7lKPqalIIdrTcug2eUYSye
Wcax2OUfhhnH4Dtc59lb243eMDj//zb3q/wXBhMQFZhZXMcNF6P7lh6Z6edSMMDG
Wi71VK+dSJdCeXo179W3jztcj6ZnY+DUvkAnLPdxJR58xgjDTVIPJFogkYEnc+pJ
qWELKYh5Z/MAbckAaLWSi4nVmdQve6bBYI0Amgxz8/ilciV1NAkNKZOHPVKaOY/7
4NPnCKV1Uqj6u2tHZYOF
=a33b
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FC2EBA5.8010500>