mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
src: only block SIGUSR1 when HAVE_INSPECTOR
I'm currently seeing a timeout error for test-signal-handler.js on macosx when using the following configuration: ./configure --debug --without-ssl && make -j8 test --without-ssl implies that there will be no inspector but the signal SIGUSR1 is blocked in PlatformInit just the same. But in this case never unblocked which is causing the signal to never be delivered to the handlers in test-signal-handler.js and it loops until it times out. Not sure if this is the best way of fixing this but hopefully more eyes on this will help. PR-URL: https://github.com/nodejs/node/pull/12266 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
1807080d3d
commit
65a6e05da5
1 file changed
+4
@@ -4074,10 +4074,12 @@ static void DebugEnd(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
inline void PlatformInit() {
|
||||
#ifdef __POSIX__
|
||||
#if HAVE_INSPECTOR
|
||||
sigset_t sigmask;
|
||||
sigemptyset(&sigmask);
|
||||
sigaddset(&sigmask, SIGUSR1);
|
||||
const int err = pthread_sigmask(SIG_SETMASK, &sigmask, nullptr);
|
||||
#endif // HAVE_INSPECTOR
|
||||
|
||||
// Make sure file descriptors 0-2 are valid before we start logging anything.
|
||||
for (int fd = STDIN_FILENO; fd <= STDERR_FILENO; fd += 1) {
|
||||
@@ -4092,7 +4094,9 @@ inline void PlatformInit() {
|
||||
ABORT();
|
||||
}
|
||||
|
||||
#if HAVE_INSPECTOR
|
||||
CHECK_EQ(err, 0);
|
||||
#endif // HAVE_INSPECTOR
|
||||
|
||||
#ifndef NODE_SHARED_MODE
|
||||
// Restore signal dispositions, the parent process may have changed them.
|
||||
|
||||
Reference in new issue
Block a user