about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-05 15:53:04 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-05 15:53:04 +0200
commit8ca3ffd711e2d5a4c410d1dc318bfb86bedb6c93 (patch)
tree94f25cc9263ca401d772c206b6fd7c4104b9c46b
parent6456b9378484743c973db1e6f0699f20462872af (diff)
downloadnq-8ca3ffd711e2d5a4c410d1dc318bfb86bedb6c93.tar.gz
nq-8ca3ffd711e2d5a4c410d1dc318bfb86bedb6c93.tar.xz
nq-8ca3ffd711e2d5a4c410d1dc318bfb86bedb6c93.zip
fq: close stdin, we never use it
-rw-r--r--fq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fq.c b/fq.c
index 34553da..7f6f5fd 100644
--- a/fq.c
+++ b/fq.c
@@ -53,6 +53,8 @@ main(int argc, char *argv[])
 	int ifd, wd;
 #endif
 
+	close(0);
+
 	if (argc < 2) {
 		/* little better than glob(3)... */
 		execl("/bin/sh", "sh", "-c", "fq ${NQDIR:+$NQDIR/},*", (char *) 0);