diff --git a/src/core/memory.d b/src/core/memory.d index a1d487d1f3..45535c1cd1 100644 --- a/src/core/memory.d +++ b/src/core/memory.d @@ -38,7 +38,7 @@ * * Notes_to_implementors: * $(UL - * $(LI On POSIX systems, the signals SIGUSR1 and SIGUSR2 are reserved + * $(LI On POSIX systems, the signals `SIGRTMIN` and `SIGRTMIN + 1` are reserved * by this module for use in the garbage collector implementation. * Typically, they will be used to stop and resume other threads * when performing a collection, but an implementation may choose diff --git a/src/core/thread.d b/src/core/thread.d index ecf9b91ee7..415019e870 100644 --- a/src/core/thread.d +++ b/src/core/thread.d @@ -1908,7 +1908,7 @@ version( CoreDdoc ) { /** * Instruct the thread module, when initialized, to use a different set of - * signals besides SIGUSR1 and SIGUSR2 for suspension and resumption of threads. + * signals besides `SIGRTMIN` and `SIGRTMIN + 1` for suspension and resumption of threads. * This function should be called at most once, prior to thread_init(). * This function is Posix-only. */ @@ -1966,12 +1966,13 @@ extern (C) void thread_init() { if( suspendSignalNumber == 0 ) { - suspendSignalNumber = SIGUSR1; + suspendSignalNumber = SIGRTMIN; } if( resumeSignalNumber == 0 ) { - resumeSignalNumber = SIGUSR2; + resumeSignalNumber = SIGRTMIN + 1; + assert(resumeSignalNumber <= SIGRTMAX); } int status;