Fix: posix_spawnattr_destroy

This commit is contained in:
Vaughan Rouesnel
2022-11-14 04:39:04 +01:00
parent 66dd930bf8
commit ef6fc1cd7e

View File

@@ -51,12 +51,7 @@ pub const PosixSpawn = struct {
}
pub fn deinit(self: *Attr) void {
if (comptime bun.Environment.isMac) {
// https://github.com/ziglang/zig/issues/12964
system.posix_spawnattr_destroy(&self.attr);
} else {
_ = system.posix_spawnattr_destroy(&self.attr);
}
_ = system.posix_spawnattr_destroy(&self.attr);
self.* = undefined;
}
@@ -93,12 +88,7 @@ pub const PosixSpawn = struct {
}
pub fn deinit(self: *Actions) void {
if (comptime bun.Environment.isMac) {
// https://github.com/ziglang/zig/issues/12964
system.posix_spawn_file_actions_destroy(&self.actions);
} else {
_ = system.posix_spawn_file_actions_destroy(&self.actions);
}
_ = system.posix_spawn_file_actions_destroy(&self.actions);
self.* = undefined;
}