2001-11-20 07:14:09

by Akshat Kapoor

[permalink] [raw]
Subject: Query - How to Send Signal to application from kernel module !

Hi All,
I'm writing a network device driver. I want to communicate with an
application running in user mode. I want to send a signal (using
something like kill) on which the application would be listening.
Subsequently the application will send an IOCTL call to the driver to fetch
the information.
Is it possible in Linux to send a signal to an application from a driver ?
I've done this in Windows NT but Idont know how to do it in Linux. I
searched
the archives but couldn't find any relevant thread. I tried to use the kill
system call but when I compiled the driver with <signal.h> it gave me all
sorts of errors. Also the equivalent signal.h in kernel source tree doesn't
have a proto for kill().
Am I missing something ?
Sorry if I'm asking something silly as I'm new to this but can somebody
kindly point me to the right direction ?

TIA,
Regards,
Akshat


2001-11-20 08:05:24

by Sameer K S

[permalink] [raw]
Subject: RE: Query - How to Send Signal to application from kernel module !

You might want to check out async notification stuff at
http://www.xml.com/ldd/chapter/book/ch05.html#t4

Sameer.

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Akshat Kapoor
Sent: Monday, November 19, 2001 11:14 PM
To: [email protected]
Subject: Query - How to Send Signal to application from kernel module !


Hi All,
I'm writing a network device driver. I want to communicate with an
application running in user mode. I want to send a signal (using
something like kill) on which the application would be listening.
Subsequently the application will send an IOCTL call to the driver to fetch
the information.
Is it possible in Linux to send a signal to an application from a driver ?
I've done this in Windows NT but Idont know how to do it in Linux. I
searched
the archives but couldn't find any relevant thread. I tried to use the kill
system call but when I compiled the driver with <signal.h> it gave me all
sorts of errors. Also the equivalent signal.h in kernel source tree doesn't
have a proto for kill().
Am I missing something ?
Sorry if I'm asking something silly as I'm new to this but can somebody
kindly point me to the right direction ?

TIA,
Regards,
Akshat

2001-11-20 08:21:58

by Sebastian Heidl

[permalink] [raw]
Subject: Re: Query - How to Send Signal to application from kernel module !

On Tue, Nov 20, 2001 at 12:43:52PM +0530, Akshat Kapoor wrote:
> Is it possible in Linux to send a signal to an application from a driver ?
> I've done this in Windows NT but Idont know how to do it in Linux. I
have a look at kernel/signal.c
I think you can use all the send_* force_* and kill_* functions but I'm not sure
with this. Currently I used kill_proc_info and force_sig and they worked just
fine.

HTH,
_sh_