Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create child processes in node.js which do not exit when their parents do?

Is it possible to create child processes in node.js which do not exit when their parents do?

I'm running node v0.6.19.

like image 710
siddMahen Avatar asked Jan 17 '23 10:01

siddMahen


1 Answers

Yes, use child_process.spawn and pass the detached option, then call child.unref().

Make sure you read the notes: http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options

like image 95
Bartvds Avatar answered Jan 29 '23 15:01

Bartvds