How to send a signal from inside the kernel?

2005-03-17 Thread Aziz KEZZOU
Hi all, I would like to send a signal (e.g SIGUSR1) to a user process from inside the kernel (kld module). Can any one tell me how to do it ? I tried the following code inspired from sys/kern/kern_sig.c : == #include #include int proce

Re: How to send a signal from inside the kernel?

2005-03-17 Thread John-Mark Gurney
Aziz KEZZOU wrote this message on Thu, Mar 17, 2005 at 12:34 -0500: > Hi all, > I would like to send a signal (e.g SIGUSR1) to a user process from > inside the kernel (kld module). > Can any one tell me how to do it ? > I tried the following code inspired from sys/kern/kern_sig.c : > ==

Re: How to send a signal from inside the kernel?

2005-03-17 Thread Aziz KEZZOU
> Aziz KEZZOU wrote this message on Thu, Mar 17, 2005 at 12:34 -0500: > > Hi all, > > I would like to send a signal (e.g SIGUSR1) to a user process from > > inside the kernel (kld module). > > Can any one tell me how to do it ? > > I tried the following code inspired from sys/kern/kern_sig.c : > >

Re: How to send a signal from inside the kernel?

2005-03-17 Thread John-Mark Gurney
Aziz KEZZOU wrote this message on Thu, Mar 17, 2005 at 14:55 -0500: > > Aziz KEZZOU wrote this message on Thu, Mar 17, 2005 at 12:34 -0500: > > > Hi all, > > > I would like to send a signal (e.g SIGUSR1) to a user process from > > > inside the kernel (kld module). > > > Can any one tell me how to d

Re: How to send a signal from inside the kernel?

2005-03-17 Thread Max Laier
On Thursday 17 March 2005 20:55, Aziz KEZZOU wrote: > Here are the headers needed in case someone reads this thread: > > #include /*needed only for NULL, can be removed*/ > #include > #include As a community service: Style(9) instructs to include either OR but not both. The latter includes

Re: How to send a signal from inside the kernel?

2005-03-17 Thread Joseph Koshy
> Here are the headers needed in case someone reads this thread: > > #include /*needed only for NULL, can be removed*/ > #include > #include > #include > #include > #include According to the manual page for psignal(9) in -current, you only need and . You need to hold the PROC lock for th

Re: How to send a signal from inside the kernel?

2005-03-18 Thread Robert Watson
On Thu, 17 Mar 2005, John-Mark Gurney wrote: > > but that causes a page fault in kernel mode (ie. Kernel panic :-) > > > > Any help is appreciated, thanks. > > Take a look at psignal(9)... You'll need to look up the struct proc for > psignal with pfind(9)... and then PROC_UNLOCK the struct pr