Bird
0
0

Which method is used to create a child process that supports IPC in Node.js?

easy📝 Syntax Q3 of 15
Node.js - Child Processes
Which method is used to create a child process that supports IPC in Node.js?
Afork()
Bspawn()
Cexec()
DcreateProcess()
Step-by-Step Solution
Solution:
  1. Step 1: Review child process creation methods

    Node.js provides spawn(), exec(), and fork() to create child processes.
  2. Step 2: Identify which supports IPC

    Only fork() creates a child process with an IPC channel for message passing.
  3. Final Answer:

    fork() -> Option A
  4. Quick Check:

    IPC child process method = fork() [OK]
Quick Trick: Use fork() for IPC, spawn() and exec() do not support it by default [OK]
Common Mistakes:
  • Choosing spawn() or exec() which lack IPC channel
  • Assuming createProcess() exists in Node.js

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes