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

Mikael Magnusson <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <CAHYJk3RwMATGznPZ+So0qAfYTt=tJv78v2nX6bh3DAyY=U0UeQ@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.