Date: Sat, 22 Aug 2009 21:40:09 +0200 From: Ed Schouten <ed@80386.nl> To: Jeremie Le Hen <jeremie@le-hen.org> Cc: freebsd-current@FreeBSD.org Subject: Re: truss(1) locked in kernel with 8.0-BETA2 Message-ID: <20090822194009.GQ1292@hoeg.nl> In-Reply-To: <20090822185812.GC61707@felucia.tataz.chchile.org> References: <20090822185812.GC61707@felucia.tataz.chchile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--x6I3On15oG0ucwLF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jeremie, * Jeremie Le Hen <jeremie@le-hen.org> wrote: > I've upgraded my laptop to 8.0-BETA2 and ran portupgrade in script(1). > But according to top, it seems script(1) is going crazy, even after I've > hit ^C: The fact that script(1) is going crazy, is a known issue. I have been pointed to this issue earlier, but unfortunately I don't know what to do. A certain Colin introduced this bug about 6 years ago. ;-) It's basically a shortcoming of pseudo-terminals in general. script(1) wants to behave in a way which cannot be implemented using pseudo-terminals; when it receives a hangup on its standard input (on the outside), it wants to propagate the end-of-file condition and wants to continue until the child processes are finished, instead of shutting down immediately. So a couple of milliseconds later on, it calls select(2) again, but because the TTY it uses on the outside is still in a hangup condition, select(2) returns immediately. This can easily be reproduced as follows: script < /dev/null I think the only way we can sanely fix this, is by adding a special flag to instruct script(1) to keep going on, even if stdin disappears. I wrote a patch for this back in May: http://80386.nl/pub/script.diff Thanks for reminding me. I should contact re@ about this. --=20 Ed Schouten <ed@80386.nl> WWW: http://80386.nl/ --x6I3On15oG0ucwLF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqQSZkACgkQ52SDGA2eCwV7eACfUDMFGzBk5er27FAFuwO+OF6y vIoAn2KUrp4ZsgmIP6OMlCoW+9MtAeTr =FNGJ -----END PGP SIGNATURE----- --x6I3On15oG0ucwLF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090822194009.GQ1292>