OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3b9fd4
)
Don't close stdin when loopfiles reads "-".
author
Rob Landley
<rob@landley.net>
Fri, 15 Jul 2016 09:39:35 +0000
(
04:39
-0500)
committer
Rob Landley
<rob@landley.net>
Fri, 15 Jul 2016 09:39:35 +0000
(
04:39
-0500)
lib/lib.c
patch
|
blob
|
history
diff --git
a/lib/lib.c
b/lib/lib.c
index
3f4819f
..
09264c9
100644
(file)
--- a/
lib/lib.c
+++ b/
lib/lib.c
@@
-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);
}