public inbox for linux-hams@vger.kernel.org
 help / color / mirror / Atom feed
From: Cathryn Mataga <cathryn@junglevision.com>
To: linux-hams@vger.kernel.org
Cc: bernard.pidoux@upmic.fr
Subject: Re: xfbbd oddness.
Date: Tue, 09 Nov 2010 18:54:42 -0800	[thread overview]
Message-ID: <4CDA0972.40108@junglevision.com> (raw)
In-Reply-To: <4CD99C63.4030406@junglevision.com>

You know, I'm not an expert on signal programming in Unix.
But, wouldn't another signal coming in during the wait cause
a the system to halt?



         for (i = 1; i < NSIG; i++)
         {
                 if (i == SIGBUS || i == SIGSEGV || i == SIGALRM)
                         continue;
                 signal (i, sig_fct);
         }


static void sig_fct (int sig)
{
         int pid, pstatus;

         sig &= 0xff;
         pid = wait (&pstatus);
         signal (sig, sig_fct);

	switch (sig)
	{
...
stuff
	}
}





This handler does nothing useful anyway except for
SIGHUP, SIGTERM, SIGBUS and SIGSEGV.  I don't see any
reason not to just ignore all signals except for the few
that do have a function here.  I'm going to let it run
like this, and see if it fixes the bug.


         for (i = 1; i < NSIG; i++)
         {
                 if (i == SIGBUS || i == SIGSEGV || i == SIGALRM)
                         continue;
                 if (i == SIGHUP || i == SIGTERM)
                         signal (i, sig_fct);
                 else    signal(i, SIG_IGN);
         }

  reply	other threads:[~2010-11-10  2:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 12:33 [PATCH 4/11] drivers/net/hamradio: Eliminate a NULL pointer dereference Julia Lawall
2010-05-27 23:29 ` David Miller
2010-11-09 19:09   ` xfbbd oddness Cathryn Mataga
2010-11-10  2:54     ` Cathryn Mataga [this message]
2010-11-12 21:23       ` Cathryn Mataga
2010-11-14  6:52         ` Cathryn Mataga
2010-11-14  6:58           ` [PATCH] xfbbd: Fix issue with xfbbd and AX25 radio connections Cathryn Mataga

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=4CDA0972.40108@junglevision.com \
    --to=cathryn@junglevision.com \
    --cc=bernard.pidoux@upmic.fr \
    --cc=linux-hams@vger.kernel.org \
    /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