diff options
Diffstat (limited to 'libc/src/spawn')
| -rw-r--r-- | libc/src/spawn/linux/posix_spawn.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/src/spawn/linux/posix_spawn.cpp b/libc/src/spawn/linux/posix_spawn.cpp index fe82ba2..f058158 100644 --- a/libc/src/spawn/linux/posix_spawn.cpp +++ b/libc/src/spawn/linux/posix_spawn.cpp @@ -44,7 +44,7 @@ cpp::optional<int> open(const char *path, int oflags, mode_t mode) { int fd = LIBC_NAMESPACE::syscall_impl<int>(SYS_openat, AT_FDCWD, path, oflags, mode); #endif - if (fd > 0) + if (fd >= 0) return fd; // The open function is called as part of the child process' preparatory // steps. If an open fails, the child process just exits. So, unlike |
