Signal generation and handling
Hi,
I'm using
Code:
int sigaction(int signum, const struct sigaction *act,struct sigaction *oldact);
to register my realtime signal and the
Code:
void (*sa_sigaction)(int, siginfo_t *, void *);
callback handler to detect the availabilty of input data (si_code==POLL_IN) on my file descriptor(a serial port).
My question is how often is the POLL_IN (i.e a SIGPOLL type) event generated by the kernel and is there someway i can suspend the signal generation for a certain time out? The problem that I'm facing is that the signal seems to be generated for every single character received on my port and my read() in the callback always reads only a byte or two.
I don't want this to happen as i want to read a chunk of data in one go (which i KNOW is available for sure once the fist byte becomes available).
Thanks.
Ravi