Print this page
3830 SIGQUEUE_MAX's limit of 32 is too low

@@ -21,19 +21,18 @@
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #include <sys/types.h>
 #include <sys/cmn_err.h>
 #include <sys/sysmacros.h>
 #include <sys/proc.h>
 #include <sys/rctl.h>
 #include <sys/rctl_impl.h>
 #include <sys/port_kernel.h>
+#include <sys/signal.h>
 
 #include <sys/vmparam.h>
 #include <sys/machparam.h>
 
 /*

@@ -63,10 +62,11 @@
 rctl_hndl_t rc_process_msgmnb;
 rctl_hndl_t rc_process_msgtql;
 rctl_hndl_t rc_process_semmsl;
 rctl_hndl_t rc_process_semopm;
 rctl_hndl_t rc_process_portev;
+rctl_hndl_t rc_process_sigqueue;
 
 /*
  * process.max-cpu-time / RLIMIT_CPU
  */
 /*ARGSUSED*/

@@ -286,11 +286,11 @@
  *   Register the various resource controls associated with process entities.
  *   The historical rlim_infinity_map and rlim_infinity32_map are now encoded
  *   here as the native and ILP32 infinite values for each resource control.
  */
 void
-rctlproc_init()
+rctlproc_init(void)
 {
         rctl_set_t *set;
         rctl_alloc_gp_t *gp;
         rctl_entity_p_t e;
 

@@ -366,10 +366,18 @@
             RCENTITY_PROCESS, RCTL_GLOBAL_DENY_ALWAYS | RCTL_GLOBAL_COUNT,
             PORT_MAX_EVENTS, PORT_MAX_EVENTS, &rctl_absolute_ops);
         rctl_add_default_limit("process.max-port-events", PORT_DEFAULT_EVENTS,
             RCPRIV_PRIVILEGED, RCTL_LOCAL_DENY);
 
+        rc_process_sigqueue = rctl_register("process.max-sigqueue-size",
+            RCENTITY_PROCESS, RCTL_GLOBAL_LOWERABLE | RCTL_GLOBAL_DENY_ALWAYS |
+            RCTL_GLOBAL_COUNT, _SIGQSZ_MAX, _SIGQSZ_MAX, &rctl_absolute_ops);
+        rctl_add_default_limit("process.max-sigqueue-size", _SIGQSZ_DEFAULT,
+            RCPRIV_BASIC, RCTL_LOCAL_DENY);
+        rctl_add_default_limit("process.max-sigqueue-size", _SIGQSZ_PRIVILEGED,
+            RCPRIV_PRIVILEGED, RCTL_LOCAL_DENY);
+
         /*
          * Place minimal set of controls on "sched" process for inheritance by
          * processes created via newproc().
          */
         set = rctl_set_create();