From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 10 18:41:53 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59176106566B; Wed, 10 Mar 2010 18:41:53 +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 20AF48FC17; Wed, 10 Mar 2010 18:41:53 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 6634E1CD0C; Wed, 10 Mar 2010 19:41:52 +0100 (CET) Date: Wed, 10 Mar 2010 19:41:52 +0100 From: Ed Schouten To: Alfred Perlstein Message-ID: <20100310184152.GF8200@hoeg.nl> References: <20100310093001.GL22317@elvis.mu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PyVBLkVRa/gQBUbw" Content-Disposition: inline In-Reply-To: <20100310093001.GL22317@elvis.mu.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Hackers Subject: Re: tty or script(1) weirdness? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 18:41:53 -0000 --PyVBLkVRa/gQBUbw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Alfred, * Alfred Perlstein wrote: > 1) download the suite. > 2) run "sh test.sh" to see the bug > 3) run "sh test.sh yes" to not see the bug (sleep called) Hmmm... It seems this is a TTY bug. When you close a TTY, the final close() call should get stuck until all data is actually drained. This doesn't seem to happen properly. You can easily test this by performing a tcdrain() right after running your perl script: #include | int | main(int argc, char *argv[]) | { |=20 | tcdrain(0); | } I'll see what I can do. --=20 Ed Schouten WWW: http://80386.nl/ --PyVBLkVRa/gQBUbw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuX5/AACgkQ52SDGA2eCwWA8gCfSTlqSQfoE0fK0kL35xTscdVD FWsAn0OvE3D8r03afpO4ddVhcdip4+DJ =esZ+ -----END PGP SIGNATURE----- --PyVBLkVRa/gQBUbw--