Date: Wed, 10 Mar 2010 21:04:10 +0100 From: Ed Schouten <ed@80386.nl> To: Alfred Perlstein <alfred@freebsd.org> Cc: FreeBSD Hackers <hackers@freebsd.org> Subject: Re: tty or script(1) weirdness? Message-ID: <20100310200410.GG8200@hoeg.nl> In-Reply-To: <20100310184152.GF8200@hoeg.nl> References: <20100310093001.GL22317@elvis.mu.org> <20100310184152.GF8200@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] * Ed Schouten <ed@80386.nl> wrote: > 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. Some further research: it's not a TTY bug, but a bug in script(1). The script parent process leaves a file descriptor open, which means output is never properly drained. I can't reproduce this issue after applying this patch: %%% Index: script.c =================================================================== --- script.c (revision 204965) +++ script.c (working copy) @@ -158,6 +158,8 @@ } if (child == 0) doshell(argv); + else + close(slave); if (flushtime > 0) tvp = &tv; %%% -- Ed Schouten <ed@80386.nl> WWW: http://80386.nl/ [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuX+zoACgkQ52SDGA2eCwVbYwCfUTBou5Vzo+E4KNt9YHYiNACh OJAAniGffxBvByrof+uLZhqp+Pix6Bzg =9+gw -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100310200410.GG8200>
