Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/native/libs/System.Native/pal_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@ static void* SignalHandlerLoop(void* arg)
free(arg);
assert(pipeFd >= 0);

#if defined(__linux__) || defined(__FreeBSD__)
pthread_setname_np(pthread_self(), ".NET SigHandler");
#endif
#if defined(__APPLE__)
// on macOS, pthread_setname_np only works for the calling thread.
pthread_setname_np(".NET SigHandler");
#endif

// Continually read a signal code from the signal pipe and process it,
// until the pipe is closed.
while (true)
Expand Down