Re: sigaction and waitpid causes "interrupted system call" when calling fgets()
- From: Martin Vuille <jpmv27@xxxxxxxxx>
- Date: 26 Jan 2008 20:53:55 GMT
popcornnnn@xxxxxxxxx wrote in
news:dcadb95c-8f6a-4dbe-ac2d-3cca375964b6@xxxxxxxxxxxxxxxxxxxxxx
s.com:
void install_sigaction_handler()
{
struct sigaction sa;
sa.sa_sigaction = signal_handler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_SIGINFO;
sigaction(SIGCHLD, &sa, NULL);
}
Look up the SA_RESTART flag in the sigaction man page. That might
help.
Also, it seems to me that you need to reap your forked children
at some point, presumably in the SIGCHLD handler.
MV
.
- References:
- Prev by Date: sigaction and waitpid causes "interrupted system call" when calling fgets()
- Next by Date: Virtual serial port in usermode?
- Previous by thread: sigaction and waitpid causes "interrupted system call" when calling fgets()
- Next by thread: Virtual serial port in usermode?
- Index(es):