Skip to content

Commit fa7e975

Browse files
mmarchinitargos
authored andcommitted
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 <[email protected]> PR-URL: #32133 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 7e5e34d commit fa7e975

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)