Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Fix Issue 23228 - OpenBSD: No SIGRTMIN or SIGRTMAX
Browse files Browse the repository at this point in the history
OpenBSD does not provide SIGRTMIN or SIGRTMAX definitions.
Workaround is to use SIGUSR1 for SIGRTMIN and 32 for SIGRTMAX.
32 is the max signal number on OpenBSD.
  • Loading branch information
Brian Callahan authored and dlang-bot committed Jul 4, 2022
1 parent 0ae1c82 commit f8eefbd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/thread/osthread.d
Original file line number Diff line number Diff line change
Expand Up @@ -1952,6 +1952,15 @@ extern (C) void thread_init() @nogc nothrow
}
else version (Posix)
{
version (OpenBSD)
{
// OpenBSD does not support SIGRTMIN or SIGRTMAX
// Use SIGUSR1 for SIGRTMIN, SIGUSR2 for SIGRTMIN + 1
// And use 32 for SIGRTMAX (32 is the max signal number on OpenBSD)
enum SIGRTMIN = SIGUSR1;
enum SIGRTMAX = 32;
}

if ( suspendSignalNumber == 0 )
{
suspendSignalNumber = SIGRTMIN;
Expand Down

0 comments on commit f8eefbd

Please sign in to comment.