MCPcopy
hub / github.com/Unitech/pm2 / tryToExit

Function tryToExit

examples/sourcemap-auto-resolve/API.js:256–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254 var fds = 0;
255 // exits process when stdout (1) and sdterr(2) are both drained.
256 function tryToExit() {
257 if ((fds & 1) && (fds & 2)) {
258 debug('This command took %ds to execute', (new Date() - that.start_timer) / 1000);
259 process.exit(code);
260 }
261 }
262
263 [process.stdout, process.stderr].forEach(function(std) {
264 var fd = std.fd;

Callers 2

exitCliMethod · 0.85
API.jsFile · 0.85

Calls 1

exitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…