OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Export notstdio() wrapper.
[android-x86/external-toybox.git]
/
lib
/
xwrap.c
diff --git
a/lib/xwrap.c
b/lib/xwrap.c
index
89488ac
..
66972f2
100644
(file)
--- a/
lib/xwrap.c
+++ b/
lib/xwrap.c
@@
-357,6
+357,8
@@
int xdup(int fd)
// old one. (We should never be called with stdin/stdout/stderr closed, but...)
int notstdio(int fd)
{
+ if (fd<0) return fd;
+
while (fd<3) {
int fd2 = xdup(fd);