Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

nofork leaves tmp files behind on errexit and ${foo?bar}



I noticed this because the test suite does this, and my /tmp had a ton
of zshdo8sar files. I can reproduce the errexit interactively but not
the other one for some reason, maybe it depends on an option? Anyway,
the test that explicitly exits rather than depend on errexit does not
leave the tmpfile behind, which makes me think this can possibly be
fixed?

% (echo "${ print INNER; exit 7; echo not reached >&2 }"); echo /tmp/zsh*
zsh: no matches found: /tmp/zsh*

% (echo "${ setopt errexit; print INNER; false; exit 7; echo not
reached >&2 }"); echo /tmp/zsh*
/tmp/zshV4lx90

% rm /tmp/zsh*
# this last one leaves the file behind from the testcase but not in my
interactive shell
% (echo "${ print INNER; echo ${unset?bar}; echo not reached >&2 }");
echo /tmp/zsh*
zsh:134: unset: bar
zsh: no matches found: /tmp/zsh*


-- 
Mikael Magnusson




Messages sorted by: Reverse Date, Date, Thread, Author