Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-50-spawn / test-exec-1.js
542 bytesRaw
1 | |
2 | |
3 | 'use strict'; |
4 | |
5 | // AppVeyor: unquoted execPath inside 'Program Files' |
6 | if (process.platform === 'win32') return; |
7 | var exec = require('child_process').exec; |
8 | |
9 | var child = exec( |
10 | process.execPath + ' ' + [ |
11 | require.resolve('./test-exec-child.js'), 'argvx', '--argvy' |
12 | ].join(' ') |
13 | // leave without callback for coverage |
14 | ); |
15 | |
16 | child.stdout.pipe(process.stdout); |
17 | child.stderr.pipe(process.stderr); |
18 | |
19 | child.on('exit', function (code) { |
20 | setTimeout(function () { |
21 | console.log('Child exited with code', code); |
22 | }, 100); |
23 | }); |
24 |
Built with git-ssb-web