On Wed, 27 Jul 2005 00:52:17 -0000, "Free Bird" <@> wrote:
[color=blue]
>Free Bird wrote:
>[color=green]
>> I have two questions about signal handlers. First of all, is it possible[/color]
>to[color=green]
>> specify a signal handler for all non-specified signals? Since ISO C[/color]
>defines[color=green]
>> only six signals but POSIX defines a lot more of them, I'd like a way to
>> just use a generic signal handler (which just exits with a special exit
>> code, for instance) for all non-standard signals, but I have no idea if[/color]
>this[color=green]
>> is possible while remaining ISO C compliant.[/color]
>
>I don't mean to sound impatient, but doesn't anyone have an answer to this
>quesion? And yes, I know I made a mistake in the subject line (maybe that
>caused you to think I had only one question ;)).
>
>If I shouldn't have posted this reminder just yet I apologize.
>[/color]
OK, I'll take a whack at it. There is no defined method of doing this.
There's nothing that I can see that would prevent you calling signal()
for the entire range of integers supported by the implementation, then
resetting the ones you want to be different, but I wouldn't recommend
it.
More sensibly, you could restrict to the range of actual signal values
for the implementation, but of course it wouldn't be portable.
--
Al Balmer
Balmer Consulting
removebalmerconsultingthis@att.net