trying to send signal from linux module
Hi!
I have a kernel (linux 2.6.11.7) module. I want this module, upon recieving an interrupt, to send a signal to a user process. How do i do that? The module recives the pid of the user process via its proc file. This dosent seem to work, any other ideas? my_interrupt_handler() { struct task_struct *p; p = find_task_by_pid(pid_of_client); force_sig(SIGUSR1, p); } the int pid_of_client is correct.. thanks! /andy |
Ok... I found answer to my own question..
had to use get_task_struct(struct task_struct) also.. the code now looks like p = find_task_by_pid(pid_of_client); if (p) { get_task_struct(p); force_sig(SIGUSR1, p); } Thanks anyway! /andy |
All times are GMT -5. The time now is 08:09 PM. |