From: John P. Looney (jplooney-ilug at domain online.ie)
Date: Tue 15 Feb 2000 - 16:54:12 GMT
On Tue, Feb 15, 2000 at 04:04:56PM +0000, alias mentioned:
> As a matter of interest, is there any way to pass parameters other than
> the signal itself to a signal handler?
> For example, say I want my signal handler to close a socket when I exit,
> it would be cool if I could pass the descriptor to the function that
> handles the signal.
Nope, afraid not. Signal handlers would have to use globals.
How is your OO C programming ? A shortcut is that you could:
Declare the descriptor to be static, not auto. Add an extra parameter to
the function that declares the descriptor, which, when set, just returns
it. Them, you can call said function with the parameter that'll cause it
to be returned.
Kate
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:05:25 GMT