diff options
| author | Rob Landley <rob@landley.net> | 2016-07-15 04:39:35 -0500 |
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2016-07-15 04:39:35 -0500 |
| commit | fff20ab005ccd98373c5a0675c286e20cf84cbb7 (patch) | |
| tree | ea3c03bae2963410f585fe7c77035dd3fd0cb368 | |
| parent | f3b9fd4ec2bdc7f77ecfe52aa9f3e671e325a8e5 (diff) | |
| download | toybox-fff20ab005ccd98373c5a0675c286e20cf84cbb7.tar.gz | |
Don't close stdin when loopfiles reads "-".
| -rw-r--r-- | lib/lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -570,7 +570,7 @@ void loopfiles_rw(char **argv, int flags, int permissions, int failok, continue; } function(fd, *argv); - if (flags & O_CLOEXEC) close(fd); + if ((flags & O_CLOEXEC) && fd) close(fd); } while (*++argv); } |
