How to catch a signal in a kernel module

Viewed 1089

I have a kernel module that has a while(1) loop in the init routine that is supposed to run infinitely.

If I have an equivalent code in a user space program, when I press Control+C the user space program is terminated, however this is not the case for a kernel module.

Is there a way to send a kill signal to the kernel module (when it is still running its init routine) so it can terminate / exit ?

Thanks in advance

1 Answers
Related