Skip to content

Commit 2339176

Browse files
authored
Merge pull request odin-lang#5825 from KamWithK/master
Linux executable path bug fix
2 parents cf223e8 + 2995536 commit 2339176

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/os/os2/process_linux.odin

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,8 @@ _process_start :: proc(desc: Process_Desc) -> (process: Process, err: Error) {
427427
strings.write_string(&exe_builder, executable_name)
428428

429429
exe_path = strings.to_cstring(&exe_builder) or_return
430-
if linux.access(exe_path, linux.X_OK) == .NONE {
430+
stat := linux.Stat{}
431+
if linux.stat(exe_path, &stat) == .NONE && .IFREG in stat.mode && .IXUSR in stat.mode {
431432
found = true
432433
break
433434
}

0 commit comments

Comments
 (0)