Re: Signals

Richard B. Johnson (root@analogic.com)
Mon, 3 Feb 1997 20:49:50 -0500 (EST)


On Mon, 3 Feb 1997, Ian Main wrote:

>
>
> On Mon, 3 Feb 1997, Richard B. Johnson wrote:
>
> > I don't know what POSIX says about this, but the included code snippet
> > clearly shows that a signal handler using a negative number is allowed
> > in the existing system. However, kill() with is negative number is NOT
> > allowed. In other words, we can't ever use the signal handler that we've
> > set up!!!
> >
> > If negative signals were allowed for user signals. We've got as many
> > as we would ever need!
>
> Sorry for my ignorance, but how difficult would it be to add new signals
> to the linux kernel? SIGUSR3, SIGUSR4 etc.. ?
>
> I have run into a few times when these would come in very handy (like the
> program I'm working on now :)
>
>
> Ian
>
> <snipped nifty program>
>
>

It would not be very difficult at all. The main point was that negative
signals "are supposed to be" for the use of anybody. Only positive
signals of specific kinds are specified. Now, if kill() didn't trap
negative signals, I think that they would work!

If negative signals were allowed, the kernel would not have to "add" any
"new" ones. It only uses the "defined" ones, which are only numbers....
and allows other non-specific handlers to be defined by persons in
user-mode.

Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.23 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-