Web Development Node.js Subjective
Sep 30, 2025

What is the difference between spawn(), exec(), and fork() in child_process?

Detailed Explanation
spawn() launches commands and streams data, exec() runs commands and buffers output, fork() creates new Node.js processes with IPC. Use spawn() for large data, exec() for small output, and fork() for CPU-intensive tasks.
Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback