about summary refs log tree commit homepage
path: root/lib/PublicInbox/IPC.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-08-19 09:56:53 +0000
committerEric Wong <e@80x24.org>2023-08-19 20:58:45 +0000
commitd7d41f6ea7cfeb14fef5b7834b2f486eddb8195e (patch)
tree0f45a1dd71064535c7bbfc7826ce666bd23d3f89 /lib/PublicInbox/IPC.pm
parente601fd7501a31da34af782aa43cf3281d1a0e453 (diff)
downloadpublic-inbox-d7d41f6ea7cfeb14fef5b7834b2f486eddb8195e.tar.gz
Tested on both amd64 and i386, and these constants tend to be
architecture-independent.
Diffstat (limited to 'lib/PublicInbox/IPC.pm')
-rw-r--r--lib/PublicInbox/IPC.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm
index c154724e..84765748 100644
--- a/lib/PublicInbox/IPC.pm
+++ b/lib/PublicInbox/IPC.pm
@@ -455,6 +455,7 @@ sub detect_nproc () {
         # _SC_NPROCESSORS_ONLN = 84 on both Linux glibc and musl
         return POSIX::sysconf(84) if $^O eq 'linux';
         return POSIX::sysconf(58) if $^O eq 'freebsd';
+        return POSIX::sysconf(503) if $^O eq 'openbsd';
         # TODO: more OSes
 
         # getconf(1) is POSIX, but *NPROCESSORS* vars are not