summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-03-11 11:28:29 +0000
committered <ed@FreeBSD.org>2010-03-11 11:28:29 +0000
commitd5cd04e542083c5c1f5ca5bcaab7d9d14c53f16f (patch)
tree6c672270ea9c49913b7684313d47b44ba9cdc23b /usr.bin
parent6ed7df7af3873824148cb24454f5b3e046c99ae6 (diff)
downloadFreeBSD-src-d5cd04e542083c5c1f5ca5bcaab7d9d14c53f16f.zip
FreeBSD-src-d5cd04e542083c5c1f5ca5bcaab7d9d14c53f16f.tar.gz
Improve the change made in the previous commit.
doshell() never returns, so there is no need to see whether we are the parent process.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/script/script.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index 6b3d8cc..6c4e0ee 100644
--- a/usr.bin/script/script.c
+++ b/usr.bin/script/script.c
@@ -158,8 +158,7 @@ main(int argc, char *argv[])
}
if (child == 0)
doshell(argv);
- else
- close(slave);
+ close(slave);
if (flushtime > 0)
tvp = &tv;
OpenPOWER on IntegriCloud