Tag

child_process

1 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Sep 11, 2024 · Backend Development

Master Node.js Child Processes: exec, spawn, fork & IPC Explained

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.jsbackend development
0 likes · 14 min read
Master Node.js Child Processes: exec, spawn, fork & IPC Explained
Sohu Tech Products
Sohu Tech Products
Dec 20, 2023 · Information Security

Command Injection Vulnerabilities in Node.js: Analysis and Prevention

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.

CVESecure CodingSecurity
0 likes · 11 min read
Command Injection Vulnerabilities in Node.js: Analysis and Prevention
Taobao Frontend Technology
Taobao Frontend Technology
Jan 17, 2023 · Backend Development

Unlocking Node.js Child Process Communication with NODE_CHANNEL_FD

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
Unlocking Node.js Child Process Communication with NODE_CHANNEL_FD
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 20, 2021 · Backend Development

Mastering Node.js Multi‑Process: From spawn to cluster for High Concurrency

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.

BackendNode.jschild_process
0 likes · 11 min read
Mastering Node.js Multi‑Process: From spawn to cluster for High Concurrency
Taobao Frontend Technology
Taobao Frontend Technology
Sep 14, 2020 · Backend Development

Why Node.js Child Processes Hang: Understanding stdio, Pipes, and Data Consumption

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.jsUnix Domain Socket
0 likes · 13 min read
Why Node.js Child Processes Hang: Understanding stdio, Pipes, and Data Consumption
System Architect Go
System Architect Go
Feb 20, 2019 · Backend Development

Calling Python Functions from Node.js Using a Command‑Line Interface

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.

CLINode.jsPIL
0 likes · 4 min read
Calling Python Functions from Node.js Using a Command‑Line Interface