diff options
Diffstat (limited to 'runtime/ops/process.rs')
-rw-r--r-- | runtime/ops/process.rs | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index ecf6ef49b..69fb5cf29 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -345,14 +345,15 @@ fn create_command( }); /* One end returned to parent process (this) */ - let pipe_rid = Some( - state - .resource_table - .add(deno_node::IpcJsonStreamResource::new(fd1 as _)?), - ); + let pipe_rid = Some(state.resource_table.add( + deno_node::IpcJsonStreamResource::new( + fd1 as _, + deno_node::IpcRefTracker::new(state.external_ops_tracker.clone()), + )?, + )); - /* The other end passed to child process via DENO_CHANNEL_FD */ - command.env("DENO_CHANNEL_FD", format!("{}", ipc)); + /* The other end passed to child process via NODE_CHANNEL_FD */ + command.env("NODE_CHANNEL_FD", format!("{}", ipc)); return Ok((command, pipe_rid)); } @@ -470,14 +471,15 @@ fn create_command( } /* One end returned to parent process (this) */ - let pipe_fd = Some( - state - .resource_table - .add(deno_node::IpcJsonStreamResource::new(hd1 as i64)?), - ); - - /* The other end passed to child process via DENO_CHANNEL_FD */ - command.env("DENO_CHANNEL_FD", format!("{}", hd2 as i64)); + let pipe_fd = Some(state.resource_table.add( + deno_node::IpcJsonStreamResource::new( + hd1 as i64, + deno_node::IpcRefTracker::new(state.external_ops_tracker.clone()), + )?, + )); + + /* The other end passed to child process via NODE_CHANNEL_FD */ + command.env("NODE_CHANNEL_FD", format!("{}", hd2 as i64)); return Ok((command, pipe_fd)); } |