RE: How to send signals from kernel space to user space.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Narendra,

You can also use the kill_proc command. But this needs the PID value of
the process in the user space. So you can send the process id to the
kernel space by the following 2 ways.

1)  use the fasync system call which will store the process id of the
user space processor in the kernel space for the further use. We need to
develop the fasync call back function in the kernel space driver for
this.

2)  You can write your process id in the /proc file system and read the
/proc file from the kernel space. But this is not a recommend way in the
kernel 2.6.x versions. Here you can use the sysfs file system.

If I am wrong, please correct me.

Thanks and Regards,
Srinivas G

> -----Original Message-----
> From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-
> bounce@xxxxxxxxxxxx] On Behalf Of Narendra V Kulkarni
> Sent: Friday, December 23, 2005 4:07 PM
> To: kernelnewbies@xxxxxxxxxxxx
> Subject: How to send signals from kernel space to user space.
> 
> Hello everybody,
> 
> 
> I am newbie to linux. We are developing an embedded application.  We
are
> plugging a USB mass storage device.  We are using a devfs to create a
> device
> entry. I want to mount the USB device as soon as the device is
attached
> and
> recognised. For this i want to send use a signal handler to signal the
> insertion of the device, so that i can mount it.
> 
> Please help me in this
> 
> 
> thanks in advance,
> Narendra
> 
> 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux