commit | fff20ab005ccd98373c5a0675c286e20cf84cbb7 | [log] [tgz] |
---|---|---|
author | Rob Landley <rob@landley.net> | Fri Jul 15 04:39:35 2016 -0500 |
committer | Rob Landley <rob@landley.net> | Fri Jul 15 04:39:35 2016 -0500 |
tree | ea3c03bae2963410f585fe7c77035dd3fd0cb368 | |
parent | f3b9fd4ec2bdc7f77ecfe52aa9f3e671e325a8e5 [diff] [blame] |
Don't close stdin when loopfiles reads "-".
diff --git a/lib/lib.c b/lib/lib.c index 3f4819f..09264c9 100644 --- a/lib/lib.c +++ b/lib/lib.c
@@ -570,7 +570,7 @@ continue; } function(fd, *argv); - if (flags & O_CLOEXEC) close(fd); + if ((flags & O_CLOEXEC) && fd) close(fd); } while (*++argv); }