diff options
-rw-r--r-- | usr.bin/colcrt/colcrt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/colcrt/colcrt.c b/usr.bin/colcrt/colcrt.c index 5d7fd15..2f0bce3 100644 --- a/usr.bin/colcrt/colcrt.c +++ b/usr.bin/colcrt/colcrt.c @@ -103,8 +103,7 @@ main(int argc, char *argv[]) do { if (argc > 0) { - close(0); - if (!(f = fopen(argv[0], "r"))) { + if (!(f = freopen(argv[0], "r", stdin))) { fflush(stdout); err(1, "%s", argv[0]); } |