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.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!