git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-50-spawn / test-spawn-b.js

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

Built with git-ssb-web