Skip to content

Commit 6f9f2c5

Browse files
mmarchiniMylesBorins
authored andcommittedMar 9, 2020
test: warn when inspector process crashes
If the subprocess being inspected hard crashes, there will be no information on the log, and the parent process will just wait until timeout. Logging the error signal when it happens can help developers understand failures faster. Signed-off-by: Matheus Marchini <mmarchini@netflix.com> PR-URL: #32133 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 710c905 commit 6f9f2c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎test/common/inspector-helper.js

+3
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ class NodeInstance extends EventEmitter {
344344

345345
this._shutdownPromise = new Promise((resolve) => {
346346
this._process.once('exit', (exitCode, signal) => {
347+
if (signal) {
348+
console.error(`[err] child process crashed, signal ${signal}`);
349+
}
347350
resolve({ exitCode, signal });
348351
this._running = false;
349352
});

0 commit comments

Comments
 (0)
Please sign in to comment.