On Fri, 9 Mar 2007 16:10:29 -0800 Luong Ngo wrote:When creating the thread, which would make ioctl call, the parent
> Thanks Parav, adding singal_allow(SIGALRM) wakeup the blocking
> interruptible_sleep_on and checking the signal_pending would return
> true now.
This means that there is also a bug in your userspace program -
somehow when it invokes ioctl(), it has SIGALRM blocked. Use
sigprocmask() (or pthread_sigmask() if your program is multithreaded)
to ensure that SIGALRM is not blocked when you are expecting it to be
processed. (Even if your program does not block SIGALRM, it may
inherit a blocked SIGALRM from another program which have started it,
so the safest way is to unblock SIGALRM explicitly.)
Using allow_signal() is needed only if you create a kernel thread andCould the execution of ioctl in the driver be done in a kernel thread
want that thread to handle signals.