Commit Graph

690 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
gingerBill
af9ae4897a Merge pull request #4290 from flysand7/pipe-has-data
[os2/process]: Implement `process_exec`, and `pipe_has_data`
2024-10-01 11:30:28 +01: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
c39b934e7f Remove unused imports 2024-09-22 13:04:23 +01:00
gingerBill
327ca2ab71 Merge pull request #4261 from laytan/net-bound-endpoint
net: add `bound_endpoint` procedure
2024-09-19 12:53:42 +01: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
Yuriy Grynevych
80622bcb3a Merge branch 'odin-lang:master' into os-get-current-directory-allocator-arg 2024-09-19 00:13:19 +03:00
Yuriy Grynevych
18fd1fefc3 Update core/os/os_openbsd.odin
Co-authored-by: Laytan <laytanlaats@hotmail.com>
2024-09-19 00:11:17 +03:00
Yuriy Grynevych
568705069c Update core/os/os_netbsd.odin
Co-authored-by: Laytan <laytanlaats@hotmail.com>
2024-09-19 00:11:12 +03:00
Yuriy Grynevych
cbf0471c72 Update core/os/os_linux.odin
Co-authored-by: Laytan <laytanlaats@hotmail.com>
2024-09-19 00:11:06 +03:00
Yuriy Grynevych
35f0dcbb92 Update core/os/os_freebsd.odin
Co-authored-by: Laytan <laytanlaats@hotmail.com>
2024-09-19 00:11:00 +03:00
Yuriy Grynevych
6e979a96a1 Update core/os/os_darwin.odin
Co-authored-by: Laytan <laytanlaats@hotmail.com>
2024-09-19 00:10:53 +03:00
Laytan Laats
7491b3c332 Fix #4265 2024-09-18 22:45:27 +02:00
Yuriy Grynevych
4ff836609c [core/os] get_current_directory: Add allocator arg to targets where its missing 2024-09-18 21:03:48 +03:00
Laytan Laats
652557bfcd net: add bound_endpoint procedure 2024-09-17 22:22:19 +02:00
Karl Zylinski
093ade0504 Merge branch 'master' into file-tags-without-comments 2024-09-17 19:36:17 +02:00
gingerBill
0d33df15b4 Merge pull request #4208 from laytan/more-wasm-vendor-support
wasm: support more vendor libraries
2024-09-17 11:37:10 +01: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
Feoramund
2938655a3d Fix CPU count detection in FreeBSD & NetBSD 2024-09-11 08:39:23 -04:00
Laytan Laats
5ae27c6ebc wasm: support more vendor libraries
Adds support for:
- box2d
- cgltf
- stb image
- stb rect pack
2024-09-09 18:49:13 +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
6aedb2695a Report Invalid_Whence on some os platforms
- Move `Seek`-related checks into OS-specific files for granularity.

Platforms:
- Darwin
- FreeBSD
- Haiku
- Linux
- NetBSD
- OpenBSD
2024-08-28 19:53:20 +02:00
Feoramund
0243647e15 Add missing flush functionality to os platforms
Platforms:
- FreeBSD
- Haiku
- Linux
- NetBSD
- OpenBSD
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
741ccd7ff5 Zero n on error in _file_stream_proc 2024-08-28 19:53:20 +02:00
Feoramund
eb92a2df71 Fix indentation 2024-08-28 19:53:20 +02:00
Feoramund
d60f404bb4 Fix OpenBSD implementations of read_at and write_at 2024-08-28 19:53:20 +02:00
Feoramund
6c4806835c Fix indentation 2024-08-28 19:53:20 +02:00
Feoramund
e1555e04ad Fix Haiku implementations of read_at and write_at 2024-08-28 19:53:20 +02:00
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