git ssb

0+

cel-desktop / ssb-pkg



Tree: cfc8d49135488f7554210234b3a503c2dbd6c6a5

Files: cfc8d49135488f7554210234b3a503c2dbd6c6a5 / test / test-50-spawn / test-spawn-a-3.js

452 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5var spawn = require('child_process').spawn;
6
7var child = spawn(
8 process.execPath, [
9 require.resolve('./test-spawn-a-child.js'), 'argvx', '--argvy'
10 ], { stdio: [ 'inherit', 'inherit', 'inherit', 'ipc' ] }
11);
12
13child.on('message', function (value) {
14 console.log(value.toString());
15 child.send(value);
16});
17
18child.send(2);
19
20child.on('exit', function (code) {
21 console.log('Child exited with code', code);
22});
23

Built with git-ssb-web