From: Jeremy Fitzhardinge <jeremy@goop.org>
To: rc list <rc@hawkwind.utcs.toronto.edu>
Subject: minor nits picked up by valgrind
Date: Wed, 31 Jul 2002 02:15:47 -0500 [thread overview]
Message-ID: <1028096147.2444.57.camel@ixodes.goop.org> (raw)
Since valgrind[1] came out, I've been applying it to everything I can
think of. rc was pretty clean, with one actual (but minor) problem and
one non-problem.
The actual problem is that it doesn't clear out the sa_mask when calling
sigaction, which presumably means that there's a random set of signals
masked when calling the signal handler. I'm assuming this isn't a big
problem. Maybe it should be sigfillset instead?
The non-problem is that it tries to call sigaction on SIGKILL and
SIGSTOP. This is ignored by the kernel, but it makes valgrind complain.
Here's a patch for both of these:
--- rc-1.7/signal.c Thu Nov 1 03:29:10 2001
+++ rc-1.7.jsgf/signal.c Tue Jul 30 23:08:39 2002
@@ -14,6 +14,7 @@
new.sa_handler = handler;
new.sa_flags = SA_INTERRUPT;
+ sigemptyset(&new.sa_mask);
sigaction(signum, &new, &old);
return old.sa_handler;
}
@@ -96,6 +97,8 @@
#endif
for (i = 1; i < NUMOFSIGNALS; i++) {
+ if (i == SIGSTOP || i == SIGKILL)
+ continue;
h = sys_signal(i, SIG_IGN);
if (h != SIG_IGN && h != SIG_ERR)
sys_signal(i, h);
J
1: http://developer.kde.org/~sewardj/
next reply other threads:[~2002-07-31 20:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-31 7:15 Jeremy Fitzhardinge [this message]
2002-08-15 16:28 ` Tim Goodwin
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=1028096147.2444.57.camel@ixodes.goop.org \
--to=jeremy@goop.org \
--cc=rc@hawkwind.utcs.toronto.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.
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).