Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-02-2005, 01:38 PM   #1
LQ Newbie
Registered: Sep 2004
Posts: 4

Rep: Reputation: 0
trying to send signal from linux module

I have a kernel (linux 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..

Old 05-02-2005, 01:46 PM   #2
LQ Newbie
Registered: Sep 2004
Posts: 4

Original Poster
Rep: Reputation: 0
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)
force_sig(SIGUSR1, p);

Thanks anyway!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send user defined signal in linux feetyouwell Linux - Software 6 12-26-2007 05:40 AM
how to send a signal to a thread stephenwalter Programming 2 10-17-2005 02:07 AM
What is hup signal? How to send one to squid? Niceman2005 Linux - Newbie 2 12-17-2004 08:37 PM
Send signal to /dev/dsp marghorp Linux - Hardware 5 05-25-2004 04:17 AM
Linux kernel module programming(Signal and semaphore) eshwar_ind Programming 1 02-16-2004 01:10 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:15 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration