diff options
Diffstat (limited to 'node_modules/flagged-respawn/test/bin/respawner.js')
-rw-r--r-- | node_modules/flagged-respawn/test/bin/respawner.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/flagged-respawn/test/bin/respawner.js b/node_modules/flagged-respawn/test/bin/respawner.js new file mode 100644 index 000000000..71348ba67 --- /dev/null +++ b/node_modules/flagged-respawn/test/bin/respawner.js @@ -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); + } +}); |