Print this page
3830 SIGQUEUE_MAX's limit of 32 is too low
Reviewed by: Cedric Blancher <cedric.blancher@gmail.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Irek Szczesniak <iszczesniak@gmail.com>


 283         ((ks)->__sigbits[0] = (us)->__sigbits[0] & (FILLSET0 & ~CANTMASK0), \
 284         (ks)->__sigbits[1] = (us)->__sigbits[1] & (FILLSET1 & ~CANTMASK1), \
 285         (ks)->__sigbits[2] = (us)->__sigbits[2] & (FILLSET2 & ~CANTMASK2))
 286 #define sigktou(ks, us)         ((us)->__sigbits[0] = (ks)->__sigbits[0], \
 287                                 (us)->__sigbits[1] = (ks)->__sigbits[1], \
 288                                 (us)->__sigbits[2] = (ks)->__sigbits[2], \
 289                                 (us)->__sigbits[3] = 0)
 290 typedef struct {
 291         int     sig;                            /* signal no.           */
 292         int     perm;                           /* flag for EPERM       */
 293         int     checkperm;                      /* check perm or not    */
 294         int     sicode;                         /* has siginfo.si_code  */
 295         union sigval value;                     /* user specified value */
 296 } sigsend_t;
 297 
 298 typedef struct {
 299         sigqueue_t      sn_sigq;        /* sigq struct for notification */
 300         u_longlong_t    sn_snid;        /* unique id for notification   */
 301 } signotifyq_t;
 302 
 303 
 304 typedef struct sigqhdr {                /* sigqueue pool header         */
 305         sigqueue_t      *sqb_free;      /* free sigq struct list        */
 306         uchar_t         sqb_count;      /* sigq free count              */
 307         uchar_t         sqb_maxcount;   /* sigq max free count          */
 308         ushort_t        sqb_size;       /* size of header+free structs  */
 309         uchar_t         sqb_pexited;    /* process has exited           */
 310         uchar_t         sqb_sent;       /* number of sigq sent          */
 311         kcondvar_t      sqb_cv;         /* waiting for a sigq struct    */
 312         kmutex_t        sqb_lock;       /* lock for sigq pool           */
 313 } sigqhdr_t;
 314 
 315 #define _SIGQUEUE_MAX   32


 316 #define _SIGNOTIFY_MAX  32
 317 
 318 extern  void    setsigact(int, void (*)(int), const k_sigset_t *, int);
 319 extern  void    sigorset(k_sigset_t *, const k_sigset_t *);
 320 extern  void    sigandset(k_sigset_t *, const k_sigset_t *);
 321 extern  void    sigdiffset(k_sigset_t *, const k_sigset_t *);
 322 extern  void    sigintr(k_sigset_t *, int);
 323 extern  void    sigunintr(k_sigset_t *);
 324 extern  void    sigreplace(k_sigset_t *, k_sigset_t *);
 325 
 326 extern  int     kill(pid_t, int);
 327 
 328 #endif /* _KERNEL */
 329 
 330 #ifdef  __cplusplus
 331 }
 332 #endif
 333 
 334 #endif /* _SYS_SIGNAL_H */


 283         ((ks)->__sigbits[0] = (us)->__sigbits[0] & (FILLSET0 & ~CANTMASK0), \
 284         (ks)->__sigbits[1] = (us)->__sigbits[1] & (FILLSET1 & ~CANTMASK1), \
 285         (ks)->__sigbits[2] = (us)->__sigbits[2] & (FILLSET2 & ~CANTMASK2))
 286 #define sigktou(ks, us)         ((us)->__sigbits[0] = (ks)->__sigbits[0], \
 287                                 (us)->__sigbits[1] = (ks)->__sigbits[1], \
 288                                 (us)->__sigbits[2] = (ks)->__sigbits[2], \
 289                                 (us)->__sigbits[3] = 0)
 290 typedef struct {
 291         int     sig;                            /* signal no.           */
 292         int     perm;                           /* flag for EPERM       */
 293         int     checkperm;                      /* check perm or not    */
 294         int     sicode;                         /* has siginfo.si_code  */
 295         union sigval value;                     /* user specified value */
 296 } sigsend_t;
 297 
 298 typedef struct {
 299         sigqueue_t      sn_sigq;        /* sigq struct for notification */
 300         u_longlong_t    sn_snid;        /* unique id for notification   */
 301 } signotifyq_t;
 302 

 303 typedef struct sigqhdr {                /* sigqueue pool header         */
 304         sigqueue_t      *sqb_free;      /* free sigq struct list        */
 305         int             sqb_count;      /* sigq free count              */
 306         uint_t          sqb_maxcount;   /* sigq max free count          */
 307         size_t          sqb_size;       /* size of header+free structs  */
 308         uchar_t         sqb_pexited;    /* process has exited           */
 309         uint_t          sqb_sent;       /* number of sigq sent          */
 310         kcondvar_t      sqb_cv;         /* waiting for a sigq struct    */
 311         kmutex_t        sqb_lock;       /* lock for sigq pool           */
 312 } sigqhdr_t;
 313 
 314 #define _SIGQUEUE_SIZE_BASIC            128     /* basic limit */
 315 #define _SIGQUEUE_SIZE_PRIVILEGED       512     /* privileged limit */
 316 
 317 #define _SIGNOTIFY_MAX  32
 318 
 319 extern  void    setsigact(int, void (*)(int), const k_sigset_t *, int);
 320 extern  void    sigorset(k_sigset_t *, const k_sigset_t *);
 321 extern  void    sigandset(k_sigset_t *, const k_sigset_t *);
 322 extern  void    sigdiffset(k_sigset_t *, const k_sigset_t *);
 323 extern  void    sigintr(k_sigset_t *, int);
 324 extern  void    sigunintr(k_sigset_t *);
 325 extern  void    sigreplace(k_sigset_t *, k_sigset_t *);
 326 
 327 extern  int     kill(pid_t, int);
 328 
 329 #endif /* _KERNEL */
 330 
 331 #ifdef  __cplusplus
 332 }
 333 #endif
 334 
 335 #endif /* _SYS_SIGNAL_H */