From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: PATCH: Re: localtraps causing core dump in 3.1.6+
Date: Sun, 30 Apr 2000 17:03:22 +0000 [thread overview]
Message-ID: <1000430170322.ZM4752@candle.brasslantern.com> (raw)
In-Reply-To: <E12luix-0008EL-00.2000-04-30-15-29-31@cmailg4.svr.pol.co.uk>
On Apr 30, 3:29pm, Peter Stephenson wrote:
} Subject: Re: PATCH: Re: localtraps causing core dump in 3.1.6+
}
} dosavetrap() now always copies the trap its saving.
}
} I've merged it round Bart's changes, which were neater than mine in some
} places, and added a minimal localtraps test.
You missed a few tidbits.
} - if (!strncmp(nam, "TRAP", 4))
} + if (!strncmp(nam, "TRAP", 4) && (signum = getsignum(nam +4)) != -1)
} hn = removetrap(getsignum(nam + 4));
--- zsh-forge/current/Src/hashtable.c Sun Apr 30 09:56:30 2000
+++ Src/hashtable.c Sun Apr 30 09:58:25 2000
@@ -789,8 +789,8 @@
HashNode hn;
int signum;
- if (!strncmp(nam, "TRAP", 4) && (signum = getsignum(nam +4)) != -1)
- hn = removetrap(getsignum(nam + 4));
+ if (!strncmp(nam, "TRAP", 4) && (signum = getsignum(nam + 4)) != -1)
+ hn = removetrap(signum);
else
hn = removehashnode(shfunctab, nam);
--- zsh-forge/current/Src/signals.c Sun Apr 30 09:56:30 2000
+++ Src/signals.c Sun Apr 30 10:01:28 2000
@@ -674,7 +674,6 @@
} else {
st->list = sigfuncs[sig] ? dupeprog(sigfuncs[sig], 0) : NULL;
}
- noerrs = !!st->list;
if (!savetraps)
savetraps = znewlinklist();
/*
@@ -731,9 +730,7 @@
void
unsettrap(int sig)
{
- int ne = noerrs;
HashNode hn = removetrap(sig);
- noerrs = ne;
if (hn)
shfunctab->freenode(hn);
}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
prev parent reply other threads:[~2000-04-30 17:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20000428161546.A8208@tdc134.comm.mot.com>
[not found] ` <1000429044220.ZM30544@candle.brasslantern.com>
2000-04-29 6:23 ` Bart Schaefer
2000-04-30 14:29 ` Peter Stephenson
2000-04-30 17:03 ` Bart Schaefer [this message]
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=1000430170322.ZM4752@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=zsh-workers@sunsite.auc.dk \
/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).