Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: permanent allocation in mathevall
- X-seq: zsh-workers 8056
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: BUG: permanent allocation in mathevall
- Date: Sun, 26 Sep 1999 18:59:26 +0200
- In-reply-to: ""Bart Schaefer""'s message of "Sun, 26 Sep 1999 17:21:27 DFT." <990926172127.ZM5048@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
"Bart Schaefer" wrote:
> If you look again at the stack trace I sent, you'll see that TMOUT is a
> special case; the code looks like this:
>
> int tmout;
> dotrap(SIGALRM);
> if ((tmout = getiparam("TMOUT")))
> alarm(tmout); /* reset the alarm */
>
> Outside of dotrap(), global allocation is in effect. Inside the trap
> function itself, heap allocation is.
OK, then use this instead of 8049. The allocation at this point is
undetermined, since it's in the signal handler, so this certainly seems
safeer. Presumably global allocation is in effect only because it is in
zleread().
--- Src/signals.c.ha Thu Sep 2 10:09:24 1999
+++ Src/signals.c Sun Sep 26 18:52:31 1999
@@ -523,8 +523,10 @@
if (sigtrapped[SIGALRM]) {
int tmout;
dotrap(SIGALRM);
- if ((tmout = getiparam("TMOUT")))
- alarm(tmout); /* reset the alarm */
+ HEAPALLOC {
+ if ((tmout = getiparam("TMOUT")))
+ alarm(tmout); /* reset the alarm */
+ } LASTALLOC;
} else {
int idle = ttyidlegetfn(NULL);
int tmout = getiparam("TMOUT");
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author