Thread: What if I need more than SIGUSR1 and SIGUSR2?

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    98

    What if I need more than SIGUSR1 and SIGUSR2?

    POSIX defines only 2 user-defined signals. What if I need more than that?
    I guess one way is use one of the less used signal, for example:
    #define SIGUSR3 SIGWINCH
    But which are the less frequently used signals?
    I read that there are some user-definable, real time signals: SIGRTMIN+n through SIGRTMAX. ("On Linux 2.6, LinuxThreads uses the first three real-time signals, so threaded applications that support LinuxThreads should not use these signals for their own purposes." - from Wiki) Can I use those, even if I am not writing anything real-time?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Why whould you need so many?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    98
    I inherited a middleware that already used SIGUSR1 for signalling a 'thread injection' and SIGUSR2 for some fault tolerance/checkpointing purposes.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with sigwait
    By pio in forum Linux Programming
    Replies: 3
    Last Post: 11-29-2007, 09:05 AM
  2. Problem with signals
    By kahad in forum C Programming
    Replies: 9
    Last Post: 12-07-2006, 10:42 AM