Is there a way not to use global variables for signal,setjmp,lonjmp?

Ivan Covdy ivan at dbaccess.com
Sat Sep 15 05:16:48 AEST 1990


In:
    signal( SignalValue, ActionFunction );
the function ActionFunction can be defined only as:
    void ActionFunction( int );   i.e., it can have only one argument.

What should I do if I want to have such ActionFunction, which changes
variables, and these variables should not be global/external/static?
Are there any ways to pass more arguments to ActionFunction?

The same question is for setjmp(Env) and longjmp(Env, 0):
    are there any ways to get rid of the global variable Env?

Your answers will be appreciated.
-- 
Ivan Covdy                        INTERNET: ivan at dbaccess.com
c/o DB/Access Inc.                UUCP: {uunet,mips}!troi!ivan
2900 Gordon Avenue, Suite 101     FAX: (408) 735-0328
Santa Clara, CA 95051             TEL: (408) 735-7545



More information about the Comp.unix.internals mailing list