Thread: Puzzled: SIGALRM signal handler doesn't install

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> No it wouldn't work as zmq_poll takes microseconds for timeout, and I need seconds.
    If only there were a way to convert one to the other.....then zmq_poll would be the ideal solution.

    Also according to Posix, you shouldn't use both signal() and sigation() to control the same signal in a process.

    gg

  2. #2
    Registered User
    Join Date
    Aug 2012
    Posts
    14
    Quote Originally Posted by Codeplug View Post
    >> No it wouldn't work as zmq_poll takes microseconds for timeout, and I need seconds.
    If only there were a way to convert one to the other.....then zmq_poll would be the ideal solution.

    Also according to Posix, you shouldn't use both signal() and sigation() to control the same signal in a process.

    gg
    You are surely well informed about POSIX, but it seems to me you aren't keen on actually helping me solve my problem: pointing out where I don't adhere to POSIX standards, and what other standard things I don't do and should, doesn't really help me.

    By doing this you loose sight of my actual problem which is why my signal handler doesn't install or better doesn't get used, as it does indeed install from what I can understand of trace (by the way you didn't even comment on that).

    Also by reading the description I posted of the end result of this endeavour you should have understood this is nowhere near the final code, rather it's an oversimplified test bench for some functionality.
    I could surely put 10^7 in the timeout parameter of the zmq_poll call thanks, I know how to convert between milli, micro, nano and all the rest, but that would block and would thus render the poll technique kind of useless, wouldn't it?

    So how about stopping being picky about my not knowing enough about POSIX and actually start helping on the real matter?
    I can always learn better coding manners later when things actually work.

    But thanks anyway, I got away with SIGUSR1 and it's working nicely.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. signal handler does not print
    By barramundi9 in forum C Programming
    Replies: 4
    Last Post: 07-27-2011, 11:20 PM
  2. Signal handler for assert()
    By jeffcobb in forum Linux Programming
    Replies: 17
    Last Post: 06-10-2010, 08:36 PM
  3. Signal handler function - pointer to this gets lost
    By maus in forum C++ Programming
    Replies: 1
    Last Post: 07-01-2009, 09:10 AM
  4. using a signal handler to kill processes
    By dinjas in forum C Programming
    Replies: 2
    Last Post: 03-16-2005, 12:58 PM
  5. signal handler
    By falconetti in forum C Programming
    Replies: 1
    Last Post: 02-21-2002, 07:54 PM

Tags for this Thread