Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
=(...)
- X-seq: zsh-workers 1061
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: =(...)
- Date: Mon, 13 May 1996 10:46:17 +0200
With zsh 2.6 beta17 I'm getting:
10:41% print =(cat ~/.zshrc) =(cat ~/.zshenv)
/tmp/zshb007F- /tmp/zshb007F-
which is bad news. The problem is the use of heaps in
getoutputfile(): the filename returned is on a heap which is popped.
A safe fix is to return the ztrdup'd value which is saved in the
jobtable, since that only gets deleted when the file itself is.
(Alternatively, return a dupstring'd version of the ztrdup'd nam after
the popheap, but I think that's unnecessary.)
*** Src/exec.c.eqsub Mon May 13 10:13:25 1996
--- Src/exec.c Mon May 13 10:40:30 1996
***************
*** 2027,2037 ****
if (!(list = parsecmd(cmd)))
return NULL;
! nam = gettempname();
permalloc();
if (!jobtab[thisjob].filelist)
jobtab[thisjob].filelist = newlinklist();
! addlinknode(jobtab[thisjob].filelist, ztrdup(nam));
heapalloc();
child_block();
--- 2027,2037 ----
if (!(list = parsecmd(cmd)))
return NULL;
! nam = ztrdup(gettempname());
permalloc();
if (!jobtab[thisjob].filelist)
jobtab[thisjob].filelist = newlinklist();
! addlinknode(jobtab[thisjob].filelist, nam);
heapalloc();
child_block();
--
Peter Stephenson <pws@xxxxxx> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author