fix(node:child_process): fix crash with ipc (#8319)

* make sure `onLongTimeout` doesn't happen

* add `onLongTimeout` handler
This commit is contained in:
Dylan Conway
2024-01-20 22:53:16 -08:00
committed by GitHub
parent 885f9372f4
commit fccab2f0da
3 changed files with 7 additions and 0 deletions

View File

@@ -3076,6 +3076,7 @@ pub const VirtualMachine = struct {
.ipc = undefined,
};
const socket = IPC.Socket.fromFd(context, fd, IPCInstance, instance, null) orelse @panic("Unable to start IPC");
socket.setTimeout(0);
instance.ipc = .{ .socket = socket };
const ptr = socket.ext(*IPCInstance);