Commit Graph

292 Commits

Author SHA1 Message Date
gingerBill 3a13c598e2 Merge pull request #4733 from laytan/get-executable-path
os/os2: add get_executable_path and get_executable_directory
2025-01-24 13:09:10 +00:00
gingerBill 13a2a29b90 Merge pull request #4730 from laytan/os2-linux-loop-writes-and-cap-rw
os/os2: bring Linux to other impls standards by looping writes and maxing one shot RW sizes
2025-01-24 13:03:29 +00:00
Laytan Laats d54de6704a os/os2: use proc_pidpath for executable path on darwin 2025-01-22 18:40:06 +01:00
Laytan Laats f1b0b19710 os/os2: get_executable_path and working directory on wasi 2025-01-21 19:14:15 +01:00
Laytan Laats b673642412 os/os2: add get_executable_path and get_executable_directory 2025-01-21 18:54:45 +01:00
gingerBill 223970671f Merge pull request #4716 from laytan/os2-wasi
os/os2: wasi target support
2025-01-21 13:08:04 +00:00
Laytan 68653081be Merge pull request #4732 from zen3ger/os2-process-incorrect-working-dir
os/os2: Properly update CWD on Linux when using _process_start()
2025-01-21 00:07:32 +01:00
Roland Kovacs f6ead2e777 os/os2: Linux _process_start() write back error on fchdir failure 2025-01-20 23:31:13 +01:00
Roland Kovacs ac30d36206 os/os2: Properly update CWD on Linux when using _process_start()
The `dir_fd` argument to `execveat()` is not for setting the current working
directory. It is used to resolve relative executable paths, hence explicit
`chdir/fchdir` call is required to set CWD.
2025-01-20 22:34:49 +01:00
Laytan Laats bf58107402 os/os2: bring Linux to other impls standards by looping writes and maxing one shot RW sizes 2025-01-20 20:15:03 +01:00
jason 27998e0d21 os2/heap_linux point to runtime._heap_allocator_proc 2025-01-19 06:05:55 -05:00
Laytan Laats e4892f1bb2 os/os2: wasi target support 2025-01-18 22:23:44 +01:00
jason fa7ef28acf Implement _read_directory_iterator in os2.
Also, fix minor bug in linux.dirent_name.
2025-01-10 20:54:09 -05:00
gingerBill 4d63ee0794 Remove unused import 2025-01-05 12:55:35 +00:00
gingerBill 1bf33fe373 Use static global memory for std handles instead of allocating. 2025-01-05 12:53:20 +00:00
jason 074bef7baf Fix sys/linux 64 bit arguments on 32 bit systems
Reverese return values of compat64_arg_pair
Add register alignment to specific arm32 system calls
2025-01-02 14:50:45 -05:00
jason ce1f3b34c0 Minor fixes + cleanup in os2 and sys/linux
Add NOFOLLOW to os2.remove
Change Dev from int to u64 and make relavant casts
Fix compat64_arg_pair
2025-01-02 11:03:24 -05:00
gingerBill 1cf7a56ba7 General clean up of code 2025-01-01 15:13:46 +00:00
jason b73275cf42 Get arm64 up to speed in os2 linux
Readded open flags for arm64 to sys/linux/bits.odin. Make process_start
name based instead of descriptor based to allow running of scripts. Fix
bug in heap_linux. Fix and simplify os2.remove.
2024-12-19 17:12:07 -05:00
Laytan Laats 6e1d028861 fix #4389 - retrieve file type by opening if other methods failed 2024-12-06 23:51:14 +01:00
Laytan Laats 282d956aa7 os2: skip dir test when unsupported 2024-11-15 21:56:55 +01:00
Laytan Laats de9d0134e4 os2: fix file type detection in dir_windows 2024-11-15 21:08:14 +01:00
Laytan Laats b3c2f5cb12 os2: fix leak in dir_windows 2024-11-15 20:47:34 +01:00
gingerBill aa36ae01cf Fix #4406 os2 to not close the std file handles but rather just free the memory for the ^File data. 2024-11-04 11:55:29 +00:00
Patric Dexheimer b6599a52b5 Update process_windows.odin
Mistype
2024-10-27 23:27:18 -03:00
Laytan Laats 6bf70b60d6 os/os2: add default permissions to write_entire_file 2024-10-07 22:31:43 +02:00
Laytan Laats 4b8462aa70 os/os2: fix mkdir_all on posix with abs path 2024-10-07 22:11:16 +02:00
Laytan Laats c21e62ddb4 reset n before stderr path too 2024-10-05 11:26:23 +02:00
flysand7 f61996fd6f Don't append to buffer if nothing was read 2024-10-05 11:06:36 +11:00
Laytan b5f7332ffb Merge pull request #4272 from flysand7/os2-noquote
[os2/process]: Don't quote arguments unless needed
2024-10-04 23:12:07 +02:00
flysand7 dad418cf91 Remove unused things 2024-10-05 07:23:15 +11:00
Laytan 54ffd6df06 better error handling 2024-10-04 15:08:21 +02:00
Laytan a3c3e5c822 reset err 2024-10-04 14:53:16 +02:00
Laytan cf705d4b29 wait instead of kill 2024-10-04 14:50:26 +02:00
Laytan 861efa4e54 Revert "add some debug logs"
This reverts commit 31ee829b44.
2024-10-04 13:58:59 +02:00
Laytan 59086a24a1 add .ENOSYS == .Unsupported for posix too 2024-10-04 13:52:54 +02:00
Laytan 424dc590a3 fix bsds process_open 2024-10-04 13:52:44 +02:00
Laytan 31ee829b44 add some debug logs 2024-10-04 13:40:25 +02:00
Laytan d9cfe692a9 make sure stdout and stderr always point to allocation 2024-10-04 13:24:40 +02:00
Laytan 64508e477b add unsupported check in process test 2024-10-04 13:24:24 +02:00
Laytan 563ed69c28 fix deadlock when in write_errno_to_parent_and_abort state 2024-10-04 13:24:14 +02:00
Laytan Laats 386f144cca satisfy -vet 2024-10-04 10:54:27 +02:00
Laytan Laats 1d29dfd037 kill process if waiting didn't make it exit to avoid a zombie 2024-10-04 10:51:40 +02:00
Laytan Laats ae69f4b749 general cleanup 2024-10-04 10:50:14 +02:00
Laytan Laats 0b5cd3400f use dynamic array instead of string builder 2024-10-04 10:43:38 +02:00
Laytan Laats 77b033cf96 kill process if there was an error during reading to not leave a zombie 2024-10-04 10:38:47 +02:00
Laytan Laats 7676480526 fix temp allocator guard bug 2024-10-03 14:39:54 +02:00
Laytan Laats 77780f9ce8 fix use-after-free - closing wrong pipe 2024-10-03 14:24:00 +02:00
Laytan Laats 76806080ef fix os2.process_exec on non-windows and add a smoke test 2024-10-03 13:51:27 +02:00
flysand7 0e446e1d68 adjust docs 2024-09-29 07:54:29 +11:00