diff options
author | 2022-11-14 04:39:04 +0100 | |
---|---|---|
committer | 2022-11-14 04:39:04 +0100 | |
commit | ef6fc1cd7e2a6442df574656be8abeca53f51095 (patch) | |
tree | 863b71e54c05e7e83be0613a1823980b7f61d7f8 | |
parent | 66dd930bf825dfb9e425149caf44cfc96fe9bb7f (diff) | |
download | bun-ef6fc1cd7e2a6442df574656be8abeca53f51095.tar.gz bun-ef6fc1cd7e2a6442df574656be8abeca53f51095.tar.zst bun-ef6fc1cd7e2a6442df574656be8abeca53f51095.zip |
Fix: posix_spawnattr_destroy
-rw-r--r-- | src/bun.js/api/bun/spawn.zig | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/bun.js/api/bun/spawn.zig b/src/bun.js/api/bun/spawn.zig index c1deebd3a..1bd211cfd 100644 --- a/src/bun.js/api/bun/spawn.zig +++ b/src/bun.js/api/bun/spawn.zig @@ -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; } |