zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: =(...)
Date: Mon, 13 May 1996 10:46:17 +0200	[thread overview]
Message-ID: <199605130846.KAA14462@hydra.ifh.de> (raw)

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@ifh.de>       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.



                 reply	other threads:[~1996-05-13  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199605130846.KAA14462@hydra.ifh.de \
    --to=pws@ifh.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).