| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0a13099 commit f14d71c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + // Refs: https://github.com/nodejs/node/pull/5916 | ||
| 3 | + | ||
| 4 | + const common = require('../common'); | ||
| 5 | + const assert = require('assert'); | ||
| 6 | + const spawn = require('child_process').spawn; | ||
| 7 | + const net = require('net'); | ||
| 8 | + | ||
| 9 | + if (process.argv[2] === 'child') { | ||
| 10 | + assert(process.stdin instanceof net.Socket); | ||
| 11 | + return; | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + const proc = spawn(process.execPath, [__filename, 'child'], { stdio: 'ignore' }); | ||
| 15 | + // To double-check this test, set stdio to 'pipe' and uncomment the line below. | ||
| 16 | + // proc.stderr.pipe(process.stderr); | ||
| 17 | + proc.on('exit', common.mustCall(function(exitCode) { | ||
| 18 | + process.exitCode = exitCode; | ||
| 19 | + })); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments