On Mon, Nov 12, 2001 at 11:00:29AM -0200, Thobias Salazar Trevisan wrote: > > Hi all, > > Does anyone have any idea how can i use signal with kernel thread. > I have a kernel thread blocked at sock_recvmsg, IŽd like sometimes > to kill this thread. So, when i send a SIGTERM, the linux crash. > Ah, in my cleanup_module i have kill_proc(pid[i], SIGKILL, 1), and it > crash too. > close the socket the thread is blocked on and it would free the thread. Regarding the signal stuff: What I can tell you is that the kernel checks for pending signals before going back from kernel space to user space (after a system call) and when waking up from interruptible sleep. The first is not relevant to you because your thread remains in the kernel always and neither the second because your thread is still sleeping. I think you should go with closing the socket. -Etay Meiri -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/