child_process-remote
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "child_process-remote", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "child_process spawn over TCP", | ||
@@ -5,0 +5,0 @@ "main": "spawn.js", |
@@ -30,2 +30,3 @@ "use strict"; | ||
var remotestderr = multi.createStream('stderr'); | ||
var remotestdin = multi.receiveStream('stdin'); | ||
@@ -42,13 +43,12 @@ var data = await new Promise(resolve => control.once('data', resolve)); | ||
child.on('exit', function(code) { | ||
var payload = { | ||
type : 'event', | ||
event : 'exit', | ||
args : [code], | ||
}; | ||
debug("ACK exit", payload); | ||
control.end(JSON.stringify(payload)); | ||
client.end(); | ||
['close', 'error', 'exit'].map(function(event) { | ||
child.on(event, function(...args) { | ||
var payload = {type : 'event', event, args}; | ||
debug("ACK ", event, payload); | ||
control.write(JSON.stringify(payload)); | ||
}); | ||
}); | ||
if(child.stdin) | ||
remotestdin.pipe(child.stdin); | ||
if(child.stdout) | ||
@@ -55,0 +55,0 @@ child.stdout.pipe(remotestdout); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6945