Feoramund
7061032db6
Fix NetBSD implementations of read_at and write_at
...
These procedures must not modify the underlying file pointer.
2024-08-28 19:53:20 +02:00
Feoramund
861d892ffe
Make Windows pread and pwrite conform to POSIX
2024-08-28 19:53:20 +02:00
Feoramund
5c8c63ae04
Fix FreeBSD implementations of read_at and write_at
...
These procedures must not modify the underlying file pointer.
2024-08-28 19:53:20 +02:00
Feoramund
1ced76cdd1
Fix broken cases of Seek usage in _file_stream_proc
...
Handles `EINVAL`, among other fixes.
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
9aeb0d0fb6
Merge pull request #4142 from laytan/os2-propogate-errors-from-execv
...
os2: propagate errors from execv
2024-08-25 21:09:54 +02: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
gingerBill
eb799393d5
Fix -vet-tabs issues
2024-08-24 13:56:41 +01: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
gingerBill
574dc5efe6
Merge pull request #4120 from laytan/posix-process
...
os2: process API for Darwin and most of it for BSDs
2024-08-22 22:51:48 +01: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
c0125f3192
correct the riscv64 stat structs
2024-08-21 14:41:23 +02:00
Laytan
ca6ef95b03
add support for linux_riscv64 and freestanding_riscv64
2024-08-20 14:06:40 +02:00
Laytan Laats
142bda2804
posix: start on process API
2024-08-17 15:48:01 +02:00
Laytan Laats
f7d7d65bc0
fix open bindings
...
`open` specifies the `mode` argument as vararg (presumably to make it
optional). varargs actually have rules about casting, in this case the
rule that any integer arg of size <= 4 has to be casted to `i32` before
passing it.
Not doing that implicit cast makes the permissions wrong or not apply at
all.
2024-08-16 22:54:53 +02:00
Feoramund
a07878be71
Check if file open-mode is O_CREATE on Darwin before forcing chmod
...
Fixes #4087
2024-08-16 14:08:55 -04: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
jason
0f052dbde7
os2/process_linux: improve error handling, use pidfd where possible, remove usage of fmt
2024-08-14 00:45:25 -04:00
Laytan Laats
e29f0a0f40
os2: dup the file descriptor before fdopendir
2024-08-14 01:45:24 +02:00
Laytan Laats
f837e35f4b
os2: fix bad free for posix file closure
2024-08-14 01:45:24 +02:00
Laytan Laats
61ee2efa35
os2: just use runtime._heap_allocator_proc instead of a copy for posix
2024-08-14 01:45:24 +02:00
Laytan Laats
e94c4e1e18
posix: remove the is_temp things that prevented use-after-frees
...
d0709a7de2
fixes those another way.
2024-08-14 01:45:24 +02:00
Laytan Laats
b07d0b38b1
os2: improve absolute/full path handling for posix
2024-08-14 01:45:23 +02:00
Laytan Laats
a73677d21a
os2: nice != priority
2024-08-14 01:44:37 +02:00
Laytan Laats
175f5b0bb1
os2: don't rely on PATH_MAX in posix read_directory implementation
2024-08-14 01:44:37 +02:00
Laytan Laats
939ba4cf08
os2: fix leak and always close directory
2024-08-14 01:44:37 +02:00
Laytan Laats
f00f68ef6f
posix/os2: fix test and add back in removed temp guard
2024-08-14 01:44:37 +02:00
Laytan Laats
de9abe1f7b
os2: skip . and .. in read dir
2024-08-14 01:44:37 +02:00
Laytan Laats
bd808f9ec6
os2: fix wiping results with temp allocator guard
2024-08-14 01:44:37 +02:00
Laytan Laats
7474db6a34
os2: fix lstat logic
2024-08-14 01:44:37 +02:00
Laytan Laats
00eb702c4a
os2: implement the iterator based read directory
2024-08-14 01:44:37 +02:00
Laytan Laats
ea5783c2ac
os2: fixes after rebasing
2024-08-14 01:44:37 +02:00