On Mon, Jan 12, 2015 at 12:34 PM, Aria Stewart <[email protected]> wrote:

> The difference is in the separation of the task: a unix process shares
> nothing, and returns nothing but a status code


That's not true at all of fork though. It shares everything copy-on-write,
and so you can communicate with the parent using a shared filehandle (a
pipe), and all variable values are shared (effectively copied) at fork
time. Perl makes this communication really easy by opening the magic "|-"
filename (see the perlipc man page).

In node's child_process this is done slightly differently - it's not a
fork, so variables aren't shared, but you do communicate over a pipe
(hidden as an EventHandler). If you want to share any variables you need to
send them to the child process over this pipe.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAPJ5V2ZsDzX2pkg4Vk5NJ%2B-PHgkdxdEQ2db-Mnr9akuys4Qw_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to