Marc Roessler
|
BSD style SA_RESTART flags for signal handling?
|
Marc Roessler
06/22/2009 12:04 PM
post32246
|
BSD style SA_RESTART flags for signal handling?
Hi,
I have a forking TCP server and would like to use a SIGCHLD handler to prevent zombies when the worker process dies.
The easiest way to do this is to use the SA_RESTART flag on the sigaction() call, since this will make sure that the
system calls are restarted - so no extra monkeying around with checking for EINTR is needed with all the syscalls.
Now it seems QNX doesn't really support this flag: according to signals.h, this is "not supported yet" (commented out)
as of 6.4.1 ... Is there a specific reason for this?
I know, it's not POSIX. But it's kind of neat to have this flag available. Note that otherwise, when using signals to be
really safe you'd have to call every "syscall" (read, write, MsgSend, ...) in a while-Loop until errno != EINTR...
Greetings,
Marc
|
|
|