On Fri, Dec 28, 2001 at 08:50:03AM -0800, Ricardo Anguiano wrote: > How about using signals? The sub-process can handle the signal by > parsing a variable file you designate at compile time. The signal > handler can then redefine environment variables with setenv(3).
Excellent idea! In bash, you can use trap to do this: ted@dondra:~$ trap "echo test; echo test2" ALRM ted@dondra:~$ kill -ALRM $$ test test2 ted@dondra:~$ trap "a=1" USR1 ted@dondra:~$ trap "a=2" USR2 ted@dondra:~$ echo $a ted@dondra:~$ kill -USR1 $$ ted@dondra:~$ echo $a 1 ted@dondra:~$ kill -USR2 $$ ted@dondra:~$ echo $a 2 -- Ted Deppner http://www.psyber.com/~ted/ _______________________________________________ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
