mirror of
https://github.com/bvanroll/rpiRadio.git
synced 2025-08-31 04:52:56 +00:00
Initial Commit
This commit is contained in:
7
ProjectNow/NodeServer/node_modules/ps-tree/test/exec/child.js
generated
vendored
Normal file
7
ProjectNow/NodeServer/node_modules/ps-tree/test/exec/child.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// does nothing child process
|
||||
console.log("Child process.id: " + process.pid);
|
||||
console.log(" - - - - - - - - - - - - - - - - - - - - - - - ");
|
||||
|
||||
setTimeout(function () {
|
||||
/* Does nothing, but prevents exit */
|
||||
}, 1000);
|
18
ProjectNow/NodeServer/node_modules/ps-tree/test/exec/parent.js
generated
vendored
Normal file
18
ProjectNow/NodeServer/node_modules/ps-tree/test/exec/parent.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
var cp = require('child_process');
|
||||
var chalk = require('chalk');
|
||||
var red = chalk.red
|
||||
var green = chalk.green
|
||||
var cyan = chalk.cyan;
|
||||
var count = 0;
|
||||
|
||||
while(count < 10) {
|
||||
var child = cp.exec("node ./test/exec/child.js", function(error, stdout, stderr) {
|
||||
console.log('stdout: ' + stdout);
|
||||
console.log(red('stderr: ' + stderr));
|
||||
if (error !== null) {
|
||||
console.log(red('exec error: ' + error));
|
||||
}
|
||||
})
|
||||
|
||||
console.log("child pid: %s | count: %s", child.pid, ++count);
|
||||
}
|
Reference in New Issue
Block a user