signal() is a really old interface and just not the best thing to use any more. Instead, you should use sigaction(). This call by default blocks block further signals of the type it is handling so you don't lose any. To write truly portable code, always use the sa_sigaction function, not the sa_handler (the spec of which can change between different unix variants). Also by default you don't have to reassert the handler every time it fires.
Main Topics
Browse All Topics





by: rendaduiyanPosted on 2008-11-24 at 19:13:32ID: 23032208
have you ever counted how many times does your handller run?
are they matched?