mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 07:43:13 +00:00
os/os2: Linux _process_start() write back error on fchdir failure
This commit is contained in:
@@ -548,8 +548,9 @@ _process_start :: proc(desc: Process_Desc) -> (process: Process, err: Error) {
|
||||
write_errno_to_parent_and_abort(child_pipe_fds[WRITE], errno)
|
||||
}
|
||||
if dir_fd != linux.AT_FDCWD {
|
||||
errno = linux.fchdir(dir_fd)
|
||||
assert(errno == nil)
|
||||
if errno = linux.fchdir(dir_fd); errno != .NONE {
|
||||
write_errno_to_parent_and_abort(child_pipe_fds[WRITE], errno)
|
||||
}
|
||||
}
|
||||
|
||||
errno = linux.execveat(dir_fd, exe_path, &cargs[0], env)
|
||||
|
||||
Reference in New Issue
Block a user