1

Nodes child_process doesn't work for my use case. What other ways to start processes from a node.js application are available? Google seems to point me to child_process for all queries I've tried.

Edit I need to start a number of processes from a node.js application. Those processes need to outlive the 'starting' process. In other words: If the 'starting' process is killed (no matter how) the spawned processes have to keep running unimpeded.

I've tried to intercept SIGINT in processes started with any method in child_process. It kinda works but as soon as the process tries to write to stdout the process crashes.

Jan Deinhard
  • 19,645
  • 24
  • 81
  • 137
  • You need to tell us exactly what you're trying to do. Why doesn't child_process.spawn work for your case? – Howard Feb 17 '12 at 08:30
  • Please see http://stackoverflow.com/questions/9311470/how-to-prevent-child-node-processes-from-getting-killed-with-the-parent-node-pro – Jan Deinhard Feb 17 '12 at 09:39

1 Answers1

1

You can do this using node-ffi as shown in the example here: https://stackoverflow.com/a/6288426/288425

Just replace echo $USER with the process you want to run.

Community
  • 1
  • 1
Rohan Singh
  • 20,497
  • 1
  • 41
  • 48