correct the sysconf value for RTSIG_MAX
authorRich Felker <dalias@aerifal.cx>
Fri, 20 Sep 2013 05:49:03 +0000 (01:49 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 20 Sep 2013 05:49:03 +0000 (01:49 -0400)
this is the number of realtime signals available, not the maximum
signal number or total number of signals.

src/conf/sysconf.c

index 97fd4fadfd07eb20c2fb1fa34df955c9d5898ee3..12e8136825d146bb14a585b48e434d59ca941516 100644 (file)
@@ -2,6 +2,7 @@
 #include <limits.h>
 #include <errno.h>
 #include <sys/resource.h>
+#include <signal.h>
 #include "syscall.h"
 #include "libc.h"
 
@@ -44,7 +45,7 @@ long sysconf(int name)
                [_SC_MQ_PRIO_MAX] = OFLOW,
                [_SC_VERSION] = VER,
                [_SC_PAGE_SIZE] = OFLOW,
-               [_SC_RTSIG_MAX] = 63, /* ?? */
+               [_SC_RTSIG_MAX] = _NSIG - 1 - 31 - 3,
                [_SC_SEM_NSEMS_MAX] = SEM_NSEMS_MAX,
                [_SC_SEM_VALUE_MAX] = OFLOW,
                [_SC_SIGQUEUE_MAX] = -1,