Commit Graph

3 Commits

Author SHA1 Message Date
Antoine du Hamel
aa8a2441cb
test: add trailing commas in test/pseudo-tty
PR-URL: https://github.com/nodejs/node/pull/46371
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-29 19:14:30 +01:00
Anna Henningsen
0649225be4
test: fix flaky test-trace-sigint-on-idle
Previously, the test could fail on slow machines because the
child process was still in the process of starting up after
one second, and not yet idle.

To resolve this:
- Wait for a message from the child process indicating that it
  had started.
- Wait some time after that, but make it platform-dependent to
  account for timing differences.
- Remove the timer in the child process.

PR-URL: https://github.com/nodejs/node/pull/31645
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-02-09 22:16:23 +01:00
legendecas
7b7e7bd185
src,lib: make ^C print a JS stack trace
If terminating the process with ctrl-c / SIGINT, prints a JS stacktrace
leading up to the currently executing code.

The feature would be enabled under option `--trace-sigint`.

Conditions of no stacktrace on sigint:

- has (an) active sigint listener(s);
- main thread is idle (i.e. uv polling), a message instead of stacktrace
  would be printed.

PR-URL: https://github.com/nodejs/node/pull/29207
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Christopher Hiller <boneskull@boneskull.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-01-28 13:52:27 +08:00