0.2.3 • Published 8 years ago

process_tools v0.2.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

process_tools

Simple binding to wait for a process and all its children (direct or indirect). Compatible with Linux, Windows & Mac OS X.

var child_process = require('child_process'),
    process_tools = require('process_tools');

var childProcess = child_process.spawn("/path/to/complex/app", []);

childProcess.on('exit', (exitCode) => {
  console.log(`The process is terminated with code: ${exitCode}`);
  console.log(`But the app isn't closed yet, due to app's forks !`);
});

var children = process_tools.children(childProcess.pid);

process_tools.waitAll(childProcess.pid, () => {
  console.log('Wait is over!');
});
0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago