This commit is contained in:
sentsin
2017-08-21 08:50:25 +08:00
parent 06c11ba9cd
commit 7feaa4eca0
1899 changed files with 181363 additions and 22513 deletions

13
node_modules/flagged-respawn/test/bin/exit_code.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env node
const flaggedRespawn = require('../../');
flaggedRespawn(['--harmony'], process.argv, function (ready) {
if (ready) {
setTimeout(function () {
process.exit(100);
}, 100);
}
});

17
node_modules/flagged-respawn/test/bin/respawner.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env node
const flaggedRespawn = require('../../');
// get a list of all possible v8 flags for the running version of node
const v8flags = require('v8flags').fetch();
flaggedRespawn(v8flags, process.argv, function (ready, child) {
if (ready) {
console.log('Running!');
} else {
console.log('Special flags found, respawning.');
}
if (child.pid !== process.pid) {
console.log('Respawned to PID:', child.pid);
}
});

16
node_modules/flagged-respawn/test/bin/signal.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env node
const flaggedRespawn = require('../../');
flaggedRespawn(['--harmony'], process.argv, function (ready, child) {
if (ready) {
setTimeout(function() {
process.exit();
}, 100);
} else {
console.log('got child!');
child.kill('SIGHUP');
}
});