Skip to content

Commit 83fbd4e

Browse files
committed
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: #44121 Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 2e04ef7 commit 83fbd4e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/node.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,10 @@ enum Flags : uint32_t {
210210
kNoICU = 1 << 3,
211211
// Do not modify stdio file descriptor or TTY state.
212212
kNoStdioInitialization = 1 << 4,
213-
// Do not register Node.js-specific signal handlers
214-
// and reset other signal handlers to default state.
213+
// Do not register Node.js-specific signal handlers, reset other signal
214+
// handlers to default state, or replace the calling thread's signal mask
215+
// (without this flag, POSIX builds with the inspector set it to block
216+
// SIGUSR1 and nothing else).
215217
kNoDefaultSignalHandling = 1 << 5,
216218
// Do not perform V8 initialization.
217219
kNoInitializeV8 = 1 << 6,

0 commit comments

Comments
 (0)