`localopts': handle recursive macro calls..
After a long server hang during a recursive macro call and
multiple manual interrupts i got a `localopts' crash ... when
calling the macro again. Reproducable via
set header
define t0 {
call t1
#var t1 t2 t3
}
define t1 {
localopts 1
set hold noheader t1
echo t1.in
call t2
echo t1.out
#var t1 t2 t3
}
define t2 {
echo t2.in
set t2
call t3
echo t2.out
}
define t3 {
echo t3.in
set t3
# debug command: called kill(getpid(), SIGINT)
du
# ok: !kill -INT $$
echo t3.out
}
# ...
? ~t0
? ~t0
Beside not dealing with recursion our temporary_localopts_store
hack (which tries to circumvent that the signal-manager is yet not
implemented) also did not do _localopts=NULL, which was the actual
cause of the crash since temporary_localopts_store uses that
value, so the dangling thing of before the interruption will
survive.