Tagged articles
11 articles
Page 1 of 1
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.jschild_process
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.

CVECommand InjectionSecure Coding
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.

Backend DevelopmentGoIPC
0 likes · 9 min read
Unlocking Node.js Child Process Communication with NODE_CHANNEL_FD
21CTO
21CTO
Dec 28, 2022 · Backend Development

Using ChatGPT to Fix Node.js Runtime Checks and Eliminate CLI Side Effects

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.

CLIChatGPTNode.js
0 likes · 5 min read
Using ChatGPT to Fix Node.js Runtime Checks and Eliminate CLI Side Effects
ELab Team
ELab Team
Jun 9, 2021 · Backend Development

Mastering Node.js Multi‑Process Architecture: Fork, Cluster, and IPC Explained

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
Mastering Node.js Multi‑Process Architecture: Fork, Cluster, and IPC Explained
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.

BackendClusterNode.js
0 likes · 11 min read
Mastering Node.js Multi‑Process: From spawn to cluster for High Concurrency
政采云技术
政采云技术
Dec 29, 2019 · Backend Development

Unveiling Node.js: How Processes, Threads, and Clusters Really Work

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
Unveiling Node.js: How Processes, Threads, and Clusters Really Work
Node Underground
Node Underground
Dec 3, 2015 · Backend Development

How Does Node.js Perform Synchronous Operations on an Asynchronous Engine?

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
How Does Node.js Perform Synchronous Operations on an Asynchronous Engine?