Trace process error in RunnerService.js (#955)

This commit is contained in:
Tingluo Huang
2021-02-01 10:03:15 -05:00
committed by TingluoHuang
parent 3e33b4c5f2
commit be598f1e9b

View File

@@ -30,7 +30,7 @@ var runService = function() {
listener = childProcess.spawn(listenerExePath, ['run', '--startuptype', 'service'], { env: process.env }); listener = childProcess.spawn(listenerExePath, ['run', '--startuptype', 'service'], { env: process.env });
} }
console.log('Started listener process'); console.log(`Started listener process, pid: ${listener.pid}`);
listener.stdout.on('data', (data) => { listener.stdout.on('data', (data) => {
process.stdout.write(data.toString('utf8')); process.stdout.write(data.toString('utf8'));
@@ -40,6 +40,10 @@ var runService = function() {
process.stdout.write(data.toString('utf8')); process.stdout.write(data.toString('utf8'));
}); });
listener.on("error", (err) => {
console.log(`Runner listener fail to start with error ${err.message}`);
});
listener.on('close', (code) => { listener.on('close', (code) => {
console.log(`Runner listener exited with error code ${code}`); console.log(`Runner listener exited with error code ${code}`);