signal functions

Chris Torek chris at mimsy.UUCP
Fri Apr 15 04:01:58 AEST 1988


[signal functions are called with three arguments in 4.[23]BSD:
    f(int signum, int code, struct sigcontext *scp)
]
>>Berkeley practice seems pretty firmly established to me.  What sort of
>>OS-centricism is going on here?

In article <1988Apr13.164012.513 at utzoo.uucp> [love those message IDs]
henry at utzoo.uucp (Henry Spencer) writes:
>Berklocentrism, and it's you that's doing it.  Recent releases of x.yBSD
>are the *only* variants of Unix that interface to signal handlers in that
>way. ... on any machine that has trouble with varargs functions; the
>Berkloids have this wretchedly stupid habit of not giving new interfaces
>new names.  All the world's a VAX, right?  Grr.

Well, they do have that habit (`I argues and I argues and all I gets
is a tired jaw'), but in this case you are wrong.  Well, you are right
*and* wrong.  The true signal interface in 4.2/4.3BSD is the `sigvec'
system call; the `signal' interface is emulated in the C library.
That emulation could (but does not now, on the Vax and Tahoe, where
it happens to be unnecessary) arrange to call `signal' handlers
with only one argument, while `sigvec' handlers would get all three.

Moreover, while the second argument and third arguments are overly
Vaxish, something along the lines of the third, at least, is necessary
for doing decent signal handing in the first place.

They did give the new interface a new name, and the new interface is
useful.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list