2

I can't find the answer to this question, when a master process spawns a child process, are they completely separate? What I mean is do they share any of the following: - Call stack - Event loop - Task queue

After watching this video https://www.youtube.com/watch?v=8aGhZQkoFbQ I am trying to grasp how node process work together.

MattJ
  • 683
  • 2
  • 10
  • 35

1 Answers1

1

Child processes in node.js work mostly the same as child processes created by popen. You have handles to the stdin/stdout/stderr and pid. The child process does not share any other resources (see how fork and exec work for details).

Also: Does a new node.js process created by fork (new process) or spawn (child process) get it's own separate call stack?

Additionally: node.js child process - difference between spawn & fork

Community
  • 1
  • 1
Afforess
  • 894
  • 7
  • 15