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

Commit f8eefbd

Browse files
Brian Callahandlang-bot
authored andcommitted
Fix Issue 23228 - OpenBSD: No SIGRTMIN or SIGRTMAX
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.
1 parent 0ae1c82 commit f8eefbd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/core/thread/osthread.d

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,15 @@ extern (C) void thread_init() @nogc nothrow
19521952
}
19531953
else version (Posix)
19541954
{
1955+
version (OpenBSD)
1956+
{
1957+
// OpenBSD does not support SIGRTMIN or SIGRTMAX
1958+
// Use SIGUSR1 for SIGRTMIN, SIGUSR2 for SIGRTMIN + 1
1959+
// And use 32 for SIGRTMAX (32 is the max signal number on OpenBSD)
1960+
enum SIGRTMIN = SIGUSR1;
1961+
enum SIGRTMAX = 32;
1962+
}
1963+
19551964
if ( suspendSignalNumber == 0 )
19561965
{
19571966
suspendSignalNumber = SIGRTMIN;

0 commit comments

Comments
 (0)