Universal OS (was Re: Survey of architectures)

Doug Gwyn gwyn at brl-smoke.ARPA
Fri Apr 29 06:00:18 AEST 1988


In article <51046 at sun.uucp> guy at gorodish.Sun.COM (Guy Harris) writes:
>The *only* problem is that the ANSI C signal mechanism (which will
>presumably, once ANSI C is adopted, spread its influence to the POSIX signal
>mechanism) demands that signal handlers take only one argument.

There is no logical requirement that signal handlers registered via
sigaction() (new form of sigvec()) and those registered via signal()
must have the same interface, although it is easier to implement if
they do.  There are also other ways of obtaining extended information
than by passing it as arguments to the signal handler function.  I
can think of two obvious ones and there are probably others.

It is not ANSI C that introduced the single-argument signal handler;
that was existing practice everywhere until one day Berkeley decided
to change it on their systems.  Unfortunately Berkeley did not address
the portability issues when they made the change, thereby introducing
an unnecessary complication into what was to that point a simple
mechanism.  The whole signal approach is a botch anyhow; complicating
it without fixing it seems like a counterproductive direction.



More information about the Comp.unix.wizards mailing list