Tagged articles
child_process
11 articles · Page 1 of 1
This guide explains the Node.js child_process module, covering its purpose, the four creation methods (exec, execFile, spawn, fork), how to handle output streams, inter‑process communication, best‑practice management tips, and when to choose child processes over worker threads.
IPCNode.jsParallel Processing
0 likes · 14 min read

The article examines how command‑injection flaws in popular Node.js npm packages such as find‑exec and fs‑git arise from unsafe concatenation of user input into shell commands, and recommends rigorous validation, using execFile or spawn, and regular dependency audits to prevent catastrophic system compromise.
CVECommand Injectionchild_process
0 likes · 11 min read

This article explains how Node.js uses the NODE_CHANNEL_FD environment variable to establish a socketpair for IPC between a parent process and its child, detailing the spawn implementation, underlying libuv handling, and how a Go subprocess can read and write through the shared file descriptor.
GoIPCNode.js
0 likes · 9 min read


21CTODec 28, 2022 · Backend Development
An engineer building the ZenStack toolkit for Next.js and TypeScript needed a runtime check for Node.js and Prisma, turned to ChatGPT for a quick solution, discovered unintended side effects with async-exit-hook, and ultimately refined the approach using child processes and npm tricks to achieve a clean, reliable setup.
ChatGPTNode.jsPrisma
0 likes · 5 min read

This article explains how Node.js handles processes, demonstrates creating child processes with fork, illustrates inter‑process communication (IPC) using send and message events, explores handle passing and shared ports, and shows how to build robust clusters with the built‑in cluster module.
ClusterIPCNode.js
0 likes · 11 min read

This article explains process and thread fundamentals, describes Node.js's single‑threaded nature, and provides detailed guidance on using the child_process module (spawn, fork, exec, execFile) and the cluster module to create, manage, and communicate between multiple Node.js processes for scalable, high‑concurrency applications.
BackendClusterNode.js
0 likes · 11 min read

This article explains how Node.js child_process.spawn handles stdio options, why failing to attach 'data' listeners or consume pipe streams can cause the child to block, and demonstrates experiments, debugging techniques, and proper configuration such as using 'ignore' or 'pipe' to avoid deadlocks.
DebuggingNode.jsPipe
0 likes · 13 min read

This article explains how Node.js child_process stdio options, pipe handling, and stream events interact, why unconsumed output can block a child process, and provides step‑by‑step experiments and debugging techniques to avoid deadlocks.
PipeStreamchild_process
0 likes · 13 min read


政采云技术Dec 29, 2019 · Backend Development
This article explains Node.js's internal concurrency model, covering the distinction between processes and threads, debunking the single‑thread myth, and detailing how the event loop, child processes, cluster mode, and worker_threads enable high‑performance, multi‑core execution.
ClusterNode.jsThread
0 likes · 17 min read

This article explains a lightweight technique for invoking Python functions directly from Node.js by converting the Python script into a CLI with the Fire library and executing it via Node's child_process spawn, avoiding the overhead of REST or RPC services.
Interprocess CommunicationNode.jsPIL
0 likes · 4 min read

This article explains how Node.js implements synchronous file system and child‑process APIs on top of its asynchronous libuv core, covering the underlying C/C++ bindings, error handling, debugging techniques, and the practical trade‑offs of using sync methods in real‑world scripts.
Node.jsSynchronouschild_process
0 likes · 11 min read
