diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2026-01-29 14:39:34 -0800 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2026-01-29 14:39:34 -0800 |
| commit | 7b3f189a1369f9348c007730ddea953b1e68acb1 (patch) | |
| tree | 7db8969ee8a34a10b6c8ae033c939c9d653376f6 /libc/src/spawn | |
| parent | f3d6dae13ae710323a2ddbaf87af71b1abcbfada (diff) | |
| parent | 0893b70ecfc4f4aca0a20a078476d191edc1e623 (diff) | |
| download | llvm-users/pcc/spr/codegen-introduce-machinefunctiongetpreferredalignment.zip llvm-users/pcc/spr/codegen-introduce-machinefunctiongetpreferredalignment.tar.gz llvm-users/pcc/spr/codegen-introduce-machinefunctiongetpreferredalignment.tar.bz2 | |
Created using spr 1.3.6-beta.1
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 |
