I am reposting and restating my question.
Code in my module is running on behave or a user. e.g. user invaokes a read
call (or ioctl to driver which does interruptable sleep), which is routed to
my driver. There is no data available for driver to return. Driver goes in a
loop of
=============================================================
check_data:
if (is data available)
return data
interruptible_sleep_on_timeout(&driver_waitque, MAX_SELECT_SLEEP);
if (signal_pending)
{
return -EINTER
}
goto check_data;
=============================================================
So driver loops until it finds some data. If I do ctrl-c from keyboard and
dirver is in sleep, it gets
woken up and it checks for signals, which evaluates to true and it returns
and eventually , user
program exits.
This is ok for kill signal, but if the signal is to suspend the process, it
follow same logic and return
from the calls, which is not a correct behaviour.
I have looked at accept code for ipv4. When waiting in kernel mode for new
connect to arrive, if checks for signal_pending and if this is true it
returns user land. But it does not return when ctrl-z is sent.
I cannot figure out why is the works for accept and not for my driver.
Any pointers will be greatly apprecaited.
Thanks.
Talib
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/