From 240b5027e10ab46ae540f3e47f659f731f7401c4 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 31 Jul 2015 15:43:52 +0200 Subject: close stdin/stdout, else it locks e.g. for "nq ... | cat" --- nq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nq.c b/nq.c index 7400933..69d478c 100644 --- a/nq.c +++ b/nq.c @@ -107,6 +107,8 @@ main(int argc, char *argv[]) /* output expected lockfile name. */ sprintf(lockfile, ",%011lx.%d", ms, child); dprintf(1, "%s\n", lockfile); + close(0); + close(1); /* signal parent to exit. */ close(pipefd[1]); -- cgit 1.4.1