Commit Graph

247 Commits

Author SHA1 Message Date
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
flysand7 d830069e5c [os2/process]: Implement process_exec 2024-09-28 11:25:32 +11:00
flysand7 7deb28c810 [os2/process]: Unindent doc comments 2024-09-28 10:30:54 +11:00
flysand7 842f1ae304 Fix indentation issues 2024-09-26 07:13:00 +11:00
flysand7 dbad23385d [os2]: Implement pipe_has_data procedure 2024-09-24 08:12:21 +11:00
gingerBill 6bbeb0a243 Merge pull request #4203 from karl-zylinski/file-tags-without-comments
Make tags use #+ syntax instead of //+
2024-09-19 12:36:43 +01:00
Laytan Laats 7491b3c332 Fix #4265 2024-09-18 22:45:27 +02:00
Karl Zylinski 19f0127e55 Moved all packages in core, base, vendor, tests and examples to use new #+ file tag syntax. 2024-09-14 18:27:49 +02:00
pkova 0a17525791 Remove unused base:runtime from os2/heap_linux.odin 2024-09-08 17:25:30 +00:00
pkova 499a5d1f9c Fix os2/heap_linux.odin deadlock 2024-09-08 16:47:16 +00:00
Dan Castrillo 54b46247bd fix(os2): mkdir_all on path_posix 2024-09-02 08:47:26 -04:00
gingerBill 6ba1506aa9 Fix possible leaks in os2.user_* calls 2024-08-31 15:12:47 +01:00
Laytan Laats 0f2ad95014 Fix EOF detection is os2 window read 2024-08-28 19:53:20 +02:00
Feoramund f453054aff Return 0, nil in all io cases where an empty slice is provided 2024-08-28 19:53:20 +02:00
Feoramund ef99373c31 Fix pread and pwrite on os2 Windows
The previous code was jumping ahead by the specified offset, instead of
getting the current offset.
2024-08-28 19:53:20 +02:00
Feoramund 56f232e5fc Report invalid whence & offset on os2 Windows 2024-08-28 19:53:20 +02:00
Feoramund de1432b315 Fix Windows infinite recursion with os2._flush 2024-08-28 19:53:20 +02:00
Feoramund e7d6e2d163 Add documentation to os2.close
Make it explicit that using a stream after closing is like a
use-after-free bug.
2024-08-28 19:53:20 +02:00
Feoramund 3ec4db212b Report Invalid_Whence in os2 Linux seek 2024-08-28 19:53:20 +02:00
Feoramund 7683c1f4bb Report Invalid_Whence in os2 POSIX seek 2024-08-28 19:53:20 +02:00
Feoramund ef2cd9d97f Copy missing errors in os2._get_platform_error from posix to linux 2024-08-28 19:53:20 +02:00
Feoramund 981a2e1a00 Add missing io.Stream_Mode responses 2024-08-28 19:53:19 +02:00
Laytan 5e850e24d6 os2: disable custom heap allocator
See #4161
2024-08-28 19:45:34 +02:00
gingerBill 91f8c626bb Merge pull request #4148 from Feoramund/tls-cleaner
Add API for freeing `thread_local` state
2024-08-26 22:37:08 +01:00
Laytan c1684d6335 Merge pull request #4136 from flysand7/process-info-fix
[os2/process]: Don't free process info fields in partial success scenarios
2024-08-26 23:25:21 +02:00
flysand7 1a4faff9c9 [os2/process]: Fix typo on doc comments 2024-08-27 08:06:11 +11:00
Feoramund 49606ec3ea Use thread_local_cleaner API in os2 2024-08-26 06:01:59 -04:00
flysand7 3119e0489f [os2/process]: Fix vet errors 2024-08-26 07:23:59 +11:00
flysand7 db94e646e0 [os2/process]: Adjust documentation for process info 2024-08-26 07:21:54 +11:00
flysand7 4737485f09 [os2/process]: Force return on allocation errors and process not existing 2024-08-26 07:19:39 +11:00
Laytan 0ea6809b49 os2: remove return on file_size error from read_entire_file
file_size can't return .No_Size because it uses io.size and only returns
an io.Error, removing this so it works when file_size fails (linux pipes
for instance)
2024-08-25 18:43:23 +02:00
Laytan Laats a0fe6da10b os2: propogate errors from execv functions to parent 2024-08-25 18:01:33 +02:00
flysand7 fa84e86766 [os2/process]: Allow for partial success scenarios 2024-08-25 14:22:27 +11:00
flysand7 0d7e6430eb [os2/process]: Don't free process info fields in partial success scenarios 2024-08-25 13:08:24 +11:00
Laytan Laats d410281766 os2: do read_entire_file in parts if the file size is 0 2024-08-23 20:25:47 +02:00
Laytan Laats ce53805d94 os2: fix read_entire_file wrong slice end variable 2024-08-23 20:25:19 +02:00
Laytan Laats 963e8544f4 os2: CLOEXEC the fds from pipe for posix implementation 2024-08-23 20:25:05 +02:00
Laytan Laats c2a7c29ce8 os2: fix using uuid as process handle for darwin, once it goes zombie it changes 2024-08-23 20:24:06 +02:00
Laytan Laats a66520ba57 os2: process API for Darwin and most of it for BSDs 2024-08-22 23:07:24 +02:00
Laytan Laats b9043db434 os2: make platform error more ergonomic by making it an alias 2024-08-22 22:59:13 +02:00
Laytan Laats 142bda2804 posix: start on process API 2024-08-17 15:48:01 +02:00
gingerBill 40b8150a23 Minor clean ups 2024-08-16 12:47:23 +01:00
gingerBill 31bb3dc4f0 Merge pull request #3971 from jasonKercher/os2-process-linux
os2 process linux implementation
2024-08-16 12:38:27 +01:00
jason 07a9c69714 update core:filepath's clean, join and split_list to return optional Allocator_Errors 2024-08-16 01:48:27 -04:00
DerTee 6422e49255 fix error handling in os2.read_entire_file_from_file()
even when an error in file_size() happened, os2.ERROR_NONE was returned
2024-08-14 17:30:02 +02:00