Skip to content

Commit 91953dc

Browse files
codebytereaduh95
authored andcommitted
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> PR-URL: #65877 Refs: #25777 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent fbe74a4 commit 91953dc

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
@@ -239,8 +239,10 @@ enum Flags : uint32_t {
239239
kNoICU = 1 << 3,
240240
// Do not modify stdio file descriptor or TTY state.
241241
kNoStdioInitialization = 1 << 4,
242-
// Do not register Node.js-specific signal handlers
243-
// and reset other signal handlers to default state.
242+
// Do not register Node.js-specific signal handlers, reset other signal
243+
// handlers to default state, or replace the calling thread's signal mask
244+
// (without this flag, POSIX builds with the inspector set it to block
245+
// SIGUSR1 and nothing else).
244246
kNoDefaultSignalHandling = 1 << 5,
245247
// Do not perform V8 initialization.
246248
kNoInitializeV8 = 1 << 6,

0 commit comments

Comments
 (0)