tty or script(1) weirdness?
Ed Schouten
ed at 80386.nl
Wed Mar 10 20:04:11 UTC 2010
* Ed Schouten <ed at 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 at 80386.nl>
WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100310/188eae8c/attachment.pgp
More information about the freebsd-hackers
mailing list