From 2cc17dd67cdea79d5ce5fbd12ec487932015c250 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 3 Sep 2026 00:03:53 +0000 Subject: [PATCH] doc: note that default signal handling resets the signal mask `InitializeOncePerProcess()` without `kNoDefaultSignalHandling` calls `pthread_sigmask(SIG_SETMASK, ...)` with a set containing only SIGUSR1, which unblocks every signal the embedder had blocked on the calling thread. Say so in the flag's documentation. Refs: https://github.com/nodejs/node/pull/44121 Signed-off-by: Shelley Vohr PR-URL: https://github.com/nodejs/node/pull/65877 Refs: https://github.com/nodejs/node/pull/25777 Reviewed-By: Matteo Collina --- src/node.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/node.h b/src/node.h index 995d8281d02..c8f45a6b4c1 100644 --- a/src/node.h +++ b/src/node.h @@ -210,8 +210,10 @@ enum Flags : uint32_t { kNoICU = 1 << 3, // Do not modify stdio file descriptor or TTY state. kNoStdioInitialization = 1 << 4, - // Do not register Node.js-specific signal handlers - // and reset other signal handlers to default state. + // Do not register Node.js-specific signal handlers, reset other signal + // handlers to default state, or replace the calling thread's signal mask + // (without this flag, POSIX builds with the inspector set it to block + // SIGUSR1 and nothing else). kNoDefaultSignalHandling = 1 << 5, // Do not perform V8 initialization. kNoInitializeV8 = 1 << 6,