fix some more O_CLOEXEC/SOCK_CLOEXEC issues
This commit is contained in:
parent
3609e019f3
commit
f2d08cf755
4 changed files with 5 additions and 7 deletions
|
|
@ -19,7 +19,7 @@ char *realpath(const char *restrict filename, char *restrict resolved)
|
|||
return 0;
|
||||
}
|
||||
|
||||
fd = open(filename, O_RDONLY|O_NONBLOCK);
|
||||
fd = open(filename, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
|
||||
if (fd < 0) return 0;
|
||||
snprintf(buf, sizeof buf, "/proc/self/fd/%d", fd);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue