git ssb

0+

cel-desktop / ssb-pkg



Tree: d456a6cc8589489e558e6164750474ed2cfc961e

Files: d456a6cc8589489e558e6164750474ed2cfc961e / 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