diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index bd2de283ebf8..6b3d8cc2f15b 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -158,6 +158,8 @@ main(int argc, char *argv[]) } if (child == 0) doshell(argv); + else + close(slave); if (flushtime > 0) tvp = &tv;