From owner-freebsd-current@FreeBSD.ORG Sat Aug 22 19:40:09 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB06B106568C for ; Sat, 22 Aug 2009 19:40:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id B44248FC1B for ; Sat, 22 Aug 2009 19:40:09 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 2E33E1CD18; Sat, 22 Aug 2009 21:40:09 +0200 (CEST) Date: Sat, 22 Aug 2009 21:40:09 +0200 From: Ed Schouten To: Jeremie Le Hen Message-ID: <20090822194009.GQ1292@hoeg.nl> References: <20090822185812.GC61707@felucia.tataz.chchile.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x6I3On15oG0ucwLF" Content-Disposition: inline In-Reply-To: <20090822185812.GC61707@felucia.tataz.chchile.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-current@FreeBSD.org Subject: Re: truss(1) locked in kernel with 8.0-BETA2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2009 19:40:10 -0000 --x6I3On15oG0ucwLF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jeremie, * Jeremie Le Hen 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 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--