[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Signals in linux 2.4.18
On Thu, Oct 03, 2002 at 03:21:51PM -0700, Seth Arnold wrote:
> On Thu, Oct 03, 2002 at 12:30:46PM +0530, Anjaneyulu wrote:
> [anj, your emails would be easier to read if you wrapped your line at 72
> characters]
>
> > I would like to know how to pass some information to the user process
> > when I am raising a signal from kernel space.
>
> Have your signal handler in your user process set a flag, informing your
> user process's main loop to read a /proc/ file, sysctl, ioctl, character
> device, etc, when it next has a chance.
>
> Traditional unix signals cannot send more than just their number to a
> process. POSIX Realtime signals can send more data, but I am not clear
> the level of POSIX realtime signal support in the linux kernel.
> (O'Reilly has a very nice book on realtime programming, released perhaps
> 1994..)
Well, many signals send additional info. Actually all signals have some.
It's however limited to what can be included in the siginfo structure
(see sigaction(2)). In kernel, you use send_sig_info function, to set
this structure. Note, that from userland, it's not possible (when using
kill). Kernel sets it up using pid and uid of the sending process.
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/