Hello Toni... > yes, it works as i expected, with no need to msleep() and checking > for signals after the sock_recvmsg() in the main loop (the function > sock_recvmsg exits with a error code -512 after a SIGKILL): I see, thanks for sharing your progress, Toni. I really appreciate it. > oldfs = get_fs(); > set_fs(KERNEL_DS); > size = sock_recvmsg(sock,&msg,len,msg.msg_flags); > set_fs(oldfs); > > if (signal_pending(current)) > break; Yeah, this reminds me to two things: 1. sock_recvmsg() usually expect data comes from user space. By using set_fs(), we temporarily switch to kernel data segment, thus avoiding access violation 2. By calling signal_pending(), we can manually check pending signal wherever and whenever we want And final conclusion is, luckily the data receiving procedure puts the process in interruptible state, if not, we need to do a really dirty hack to get out from the sleep and certainly this is not preferred at all. regards Mulyadi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/