DEV Community

Discussion on: Node.js fork is not what you think!

Collapse
 
littlefox profile image
Mara Sophie Grosch (LittleFox) • Edited

"Return value in the master process is always 0"

You mixed that up. Return value in the original process ("master") is the PID of the new process, the new process gets 0 as return value.

Ref manpages.ubuntu.com/manpages/bioni...

Collapse
 
pi0 profile image
Pooya Parsa

Yeah. You are right. I mixed up example code and blindly continued description based on it :D Thanks. Post Updated.