diff options
author | ed <ed@FreeBSD.org> | 2010-03-25 08:33:56 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-03-25 08:33:56 +0000 |
commit | 77977448377db3188ea9b7dd362b6f186b5c3f9f (patch) | |
tree | 1dbaa5d69870cf24549fe3eee2da0638bdf086bb /usr.bin | |
parent | cf7d024643689761f71dcb3f7f3bcd87fbb36bdd (diff) | |
download | FreeBSD-src-77977448377db3188ea9b7dd362b6f186b5c3f9f.zip FreeBSD-src-77977448377db3188ea9b7dd362b6f186b5c3f9f.tar.gz |
MFC r205008 and 205009:
Make script(1) a little less broken.
Close the file descriptor to the TTY. There is no reason why the parent
process should keep track of the descriptor. This ensures that the
application inside properly drains the TTY during exit(2).
Reported by: alfred
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/script/script.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index ad706dc..ef4d3ef 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -158,6 +158,7 @@ main(int argc, char *argv[]) } if (child == 0) doshell(argv); + close(slave); if (flushtime > 0) tvp = &tv; |