portable signal handling
Wayne A. Throop
throopw at xyzzy.UUCP
Fri Apr 8 00:58:24 AEST 1988
> henry at utzoo.uucp (Henry Spencer)
> I'm only gonna say this one more time: just about the only fully portable
> thing a signal handler can do is set a flag. Not just any flag, but a
> flag of type sig_atomic_t, defined in <signal.h> in an ANSI C implementation.
This reminds me of an issue I'd thought of before. If the only portable
thing that receipt of a signal can provoke is the setting of a flag, why
doesn't ANSI specify signal catching routines where the user can specify
SIG_DFL, SIG_IGN, or the address of a flag of type sig_atomic_t?
The current non-portable, more general routines could be kept as "common
extensions", but the more portable thing would be required.
--
Everyone can be taught to scilpt: Michelangelo would have had to be
taught how not to. So it is with the great programmers.
--- Alan J. Perlis
--
Wayne Throop <the-known-world>!mcnc!rti!xyzzy!throopw
More information about the Comp.lang.c
mailing list