mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
parent
e81b3e06c5
commit
fe4eaba563
|
@ -255,7 +255,7 @@ int open_cloexec(const char *path, int flags, mode_t mode) {
|
|||
fd = open(path, flags | O_CLOEXEC, mode);
|
||||
#else
|
||||
fd = open(path, flags, mode);
|
||||
if (fd >= 0 && !set_cloexec(fd)) {
|
||||
if (fd >= 0 && set_cloexec(fd)) {
|
||||
exec_close(fd);
|
||||
fd = -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user