authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-16 04:04:56+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-16 16:00:21+02:00
log6315c1a19061c4efaa45b32f54aef0994e48c3b8
treec6bd98e63e2b93af1ec8a79956bef8fcf0e99b5a
parent67023fc4bd8cef20a097b4cd7b97438625049b70
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.os.linux: remove vfork()

It's a bad API with better alternatives on Linux, and is near-impossible to use safely in Zig code. closes https://codeberg.org/ziglang/zig/issues/31882

1 files changed, 0 insertions(+), 9 deletions(-)

lib/std/os/linux.zig-9
......@@ -685,15 +685,6 @@ pub fn fork() usize {
685685 }
686686}
687687
688/// This must be inline, and inline call the syscall function, because if the
689/// child does a return it will clobber the parent's stack.
690/// It is advised to avoid this function and use clone instead, because
691/// the compiler is not aware of how vfork affects control flow and you may
692/// see different results in optimized builds.
693pub inline fn vfork() usize {
694 return @call(.always_inline, syscall0, .{.vfork});
695}
696
697688pub fn futimens(fd: fd_t, times: ?*const [2]timespec) usize {
698689 return utimensat(fd, null, times, 0);
699690}