zig/lib/std
mlugg 048e85f27e
std.process.Child: add waitForSpawn
`std.Build.Step.Run` makes the very reasonable assumption that
`error.InvalidExe` will be reported on `spawn` if it will happen.
However, this property does not currently hold on POSIX targets. This
is, through a slightly convoluted series of events, partially
responsible for the sporadic `BrokenPipe` errors we've been seeing more
and more in CI runs.

Making `spawn` wait for the child to exec in the POSIX path introduces
a block of up to 400us. So, instead of doing that, we add a new API for
this particular case: `waitForSpawn`. This function is a nop on Windows,
but on POSIX it blocks until the child successfully (or otherwise) calls
`execvpe`, and reports the error if necessary. `std.Build.Step.Run`
calls this function, so that it can get `error.InvalidExe` when it wants
it.

I'm not convinced that this API is optimal. However, I think this entire
API needs to be either heavily refactored or straight-up redesigned
(related: #22504), so I'm not too worried about hitting the perfect API:
I'd rather just fix this bug for now, and figure out the long-term goal
a bit later.
2025-01-20 00:27:19 +00:00
..
Build std.process.Child: add waitForSpawn 2025-01-20 00:27:19 +00:00
c all: update to std.builtin.Type.Pointer.Size field renames 2025-01-16 12:46:29 +00:00
compress Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability (#21689) 2024-10-13 18:44:42 -07:00
crypto x86_64: fix crashes compiling the compiler and tests 2025-01-16 20:47:30 -05:00
debug debug: fix std.debug.NoPanic compile errors 2025-01-18 17:33:10 -05:00
dwarf Dwarf: remove redundant debug info 2024-12-19 17:10:03 -05:00
fmt std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
fs std.fs.Dir: update deleteTree doc comment to match function signature (#22509) 2025-01-16 20:11:42 +00:00
hash all: update to std.builtin.Type.Pointer.Size field renames 2025-01-16 12:46:29 +00:00
heap Fix index calculation in WasmPageAllocator 2024-10-12 22:53:02 +02:00
http x86_64: looped instructions 2025-01-16 20:42:08 -05:00
io all: update to std.builtin.Type.Pointer.Size field renames 2025-01-16 12:46:29 +00:00
json all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
math autodocs: reflow comment to prevent it from been put in blockquote 2025-01-18 15:45:03 +01:00
mem all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
meta all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
net
os x86_64: implement switch jump tables 2025-01-16 20:42:08 -05:00
posix x86_64: implement switch jump tables 2025-01-16 20:42:08 -05:00
process std.process.Child: add waitForSpawn 2025-01-20 00:27:19 +00:00
Random add std.testing.random_seed 2024-07-23 11:43:12 -07:00
sort compiler,lib,test,langref: migrate @setCold to @branchHint 2024-08-27 00:44:35 +01:00
tar Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target x86_64: implement clz and not 2025-01-16 20:42:08 -05:00
testing
Thread x86_64: fix crashes compiling the compiler and tests 2025-01-16 20:47:30 -05:00
time std.time.epoch: Fix comments referring to epoch as 1970-10-01 2024-08-15 17:54:27 -07:00
tz
unicode
valgrind std.valgrind: Fix some compile errors. 2024-11-04 10:56:32 +01:00
zig std.zig.system.x86: Update Intel/AMD model detection. 2025-01-19 23:42:39 +01:00
zip std.zip: Add ZIP64 support for local file header extra field 2025-01-17 22:55:55 +01:00
array_hash_map.zig std.ArrayHashMap: allow passing empty values array 2025-01-15 15:11:35 -08:00
array_list.zig std.array_list: tiny refactor for pleasure 2025-01-15 15:11:35 -08:00
ascii.zig Updated ascii.zig's isWhitespace function to use switch instead of for loop. (#22094) 2024-11-29 12:26:23 -08:00
atomic.zig std.atomic: fix cache line size for RISC-V 2025-01-12 04:51:00 +01:00
base64.zig stdlib : base64 encode to writer (#20961) 2024-09-04 08:10:12 +00:00
bit_set.zig std.DynamicBitSet: remove wrong and useless comments (#21418) 2024-09-19 17:06:23 -07:00
BitStack.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
bounded_array.zig Revert "Smaller memory footprint for BoundedArray (#16299)" 2024-08-23 22:30:10 -07:00
buf_map.zig
buf_set.zig
Build.zig std.Build: extend test_runner option to specify whether runner uses std.zig.Server 2025-01-20 00:14:58 +00:00
builtin.zig std.builtin.Type: improve ergonomics of *const anyopaque fields 2025-01-16 12:49:58 +00:00
c.zig all: update to std.builtin.Type.Pointer.Size field renames 2025-01-16 12:46:29 +00:00
coff.zig std.{coff,elf}: Remove the {MachineType,EM}.toTargetCpuArch() functions. 2024-08-23 19:56:24 +02:00
compress.zig
crypto.zig Reinstantiates AEGIS-MAC with the final construction (#22205) 2024-12-11 18:52:43 +01:00
debug.zig x86_64: implement union access 2025-01-16 20:47:30 -05:00
dwarf.zig Dwarf: cleanup emitted debug info 2024-08-22 08:44:08 +02:00
dynamic_library.zig std.dynamic_library: update to new elf API 2024-10-12 10:44:17 -07:00
elf.zig link.Elf: eliminate an O(N^2) algorithm in flush() 2024-10-12 10:44:17 -07:00
enums.zig all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
fifo.zig
fmt.zig all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
fs.zig fix compilation errors for fs and fs.Dir (#21643) 2024-10-17 01:08:58 +02:00
gpu.zig std.gpu: add instanceIndex 2024-11-01 02:04:27 +03:30
hash.zig std.hash.int: avoid words like "easy" and "fast" in doc comments 2024-11-24 15:30:52 -08:00
hash_map.zig Remove strict verifyContext invocation from hash_map implementation. (#22370) 2025-01-06 13:37:30 +00:00
heap.zig x86_64: implement switch jump tables 2025-01-16 20:42:08 -05:00
http.zig add std.http.WebSocket 2024-08-07 00:48:32 -07:00
io.zig all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
json.zig
leb128.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
linked_list.zig
log.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
macho.zig remove hard tabs from source code 2024-07-31 16:57:42 -07:00
math.zig std.math: rename make_f80 to F80.toFloat and break_f80 to F80.fromFloat 2024-09-02 00:10:22 +03:00
mem.zig x86_64: rewrite arithmetic 2025-01-16 20:42:08 -05:00
meta.zig all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
multi_array_list.zig all: update to std.builtin.Type.{Pointer,Array,StructField} field renames 2025-01-16 12:49:58 +00:00
net.zig std.c reorganization 2024-07-19 00:30:32 -07:00
once.zig compiler,lib,test,langref: migrate @setCold to @branchHint 2024-08-27 00:44:35 +01:00
os.zig x86_64: implement switch jump tables 2025-01-16 20:42:08 -05:00
pdb.zig std.pdb: obey naming conventions 2024-08-29 23:43:52 +01:00
posix.zig x86_64: implement switch jump tables 2025-01-16 20:42:08 -05:00
priority_dequeue.zig add std.testing.random_seed 2024-07-23 11:43:12 -07:00
priority_queue.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
process.zig move std.zig.fatal to std.process.fatal 2024-07-20 01:06:28 -07:00
Progress.zig all: update to std.builtin.Type.Pointer.Size field renames 2025-01-16 12:46:29 +00:00
Random.zig all: update to std.builtin.Type.Pointer.Size field renames 2025-01-16 12:46:29 +00:00
RingBuffer.zig
segmented_list.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
SemanticVersion.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
simd.zig x86_64: implement switch jump tables 2025-01-16 20:42:08 -05:00
sort.zig std.equalRange: Compute lower and upper bounds simultaneously 2024-09-23 13:03:06 -07:00
start.zig start: Extend DWARF unwinding protection to more architectures. 2024-12-11 00:10:17 +01:00
static_string_map.zig std.static_string_map: Cast length of input for runtime initialization 2024-06-20 23:22:39 +00:00
std.zig std.crypto.tls: improve debuggability of encrypted connections 2024-11-07 20:25:26 -05:00
tar.zig Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target.zig wasm linker: finish the flush function 2025-01-15 15:11:35 -08:00
testing.zig all: update to std.builtin.Type.Pointer.Size field renames 2025-01-16 12:46:29 +00:00
Thread.zig std.Thread: Fix wasi_thread_start() export to use a pointer. 2025-01-19 03:23:00 +01:00
time.zig move std.time.sleep to std.Thread.sleep 2024-09-26 12:35:14 -07:00
treap.zig Condense and extend std.Treap's traversal functionalities. (#20002) 2024-07-28 19:47:55 -07:00
tz.zig
unicode.zig std: update eval branch quotas after bdbc485 2024-08-21 01:30:46 +01:00
Uri.zig
valgrind.zig std.valgrind: Port doClientRequest() to all archs supported by Valgrind. 2024-11-04 12:39:48 +01:00
wasm.zig wasm linker: implement @tagName for sparse enums 2025-01-15 15:11:36 -08:00
zig.zig Sema: rewrite semantic analysis of function calls 2025-01-09 06:46:47 +00:00
zip.zig std.zip: Add ZIP64 support for local file header extra field 2025-01-17 22:55:55 +01:00