(code)
| 66 | |
| 67 | // closes all children and the process |
| 68 | function close (code) { |
| 69 | var i, len, closed = 0, opened = 0; |
| 70 | |
| 71 | for (i = 0, len = children.length; i < len; i++) { |
| 72 | if (!children[i].exitCode) { |
| 73 | opened++; |
| 74 | children[i].removeAllListeners('close'); |
| 75 | children[i].kill("SIGINT"); |
| 76 | if (verbose) console.log('`' + children[i].cmd + '` will now be closed'); |
| 77 | children[i].on('close', function() { |
| 78 | closed++; |
| 79 | if (opened == closed) { |
| 80 | process.exit(code); |
| 81 | } |
| 82 | }); |
| 83 | } |
| 84 | } |
| 85 | if (opened == closed) {process.exit(code);} |
| 86 | |
| 87 | } |
| 88 | |
| 89 | // cross platform compatibility |
| 90 | if (process.platform === 'win32') { |
no outgoing calls
no test coverage detected
searching dependent graphs…