Re: Send Signal to application from kernel module

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

 



Hi,

You can create a proc
entry, or a device entry
through which you can register
the pid of the process to which
you want to send the signal.

some thing like
/proc/reg_pid

--------------------------------
echo <your pid> > /proc/reg_pid
--------------------------------

In the kernel write a handler for
the proc entry which will store the pid
is some place, lets say a variable.

And whenever necessary just 
send the signal using the kill_proc
to this pid.

Hope this helps
Regards
KK





On Tue, 2003-11-25 at 23:44, Juergen Oberhofer wrote:
> hm the thing is, that the module doesn't know the pid of the user process...
> I would need a function, equivalent to the 
> int kill(pid_t pid, int sig);
> function, defined in signal.h. Because by setting pid = -1 the signal is
> sent to
> every process except for process 1.
> Does there exist such a function for the kernel space? If not, does somebody
> know what other possibilities do I have?
> regards
> juergen
> 
> 
> > hi,
> >   you can try 
> >    kill_proc(pid,SIGUSR1,1);
> > thx
> > --rahul
> > 
> > On Tue, 2003-11-25 at 19:18, Juergen Oberhofer wrote:
> > > Hi,
> > > is there a function to send a SIGUSR1 signal from a kernel module to a
> > > program which
> > > runs in user space?
> > > Regards
> > > Juergen
> 

--
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