All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Kaz Kylheku <KKylheku@zeugmasystems.com>
Cc: "Kevin D. Kissell" <kevink@paralogos.com>, linux-mips@linux-mips.org
Subject: Re: Silly 100% CPU behavior on a SIG_IGN-ored SIGBUS.
Date: Fri, 26 Jun 2009 01:45:27 +0100	[thread overview]
Message-ID: <20090626004527.GA3235@linux-mips.org> (raw)
In-Reply-To: <DDFD17CC94A9BD49A82147DDF7D545C501C35485@exchange.ZeugmaSystems.local>

On Thu, Jun 25, 2009 at 09:00:19AM -0700, Kaz Kylheku wrote:

> Ralf wrote:
> > I found this in IRIX 6.5 documentation:
> > 
> >   Caution: Signals raised by the instruction stream, SIGILL, 
> >   SIGEMT, SIGBUS, and SIGSEGV, will cause infinite loops
> >   if their handler returns, or the action is set to SIG_IGN. 
> 
> The Single Unix Specification (Issue 6) marks the behavior
> explicitly undefined.

I should have mentioned that above mentioned paragraph of IRIX documentation
was in the section on implmentation specific behaviour.

> Bookmark this: http://www.opengroup.org/onlinepubs/009695399
> 
> Not the latest set of documents, but that can be regarded
> as a virtue. :)
> 
> Under pthread_sigmask and sigprocmask, for blocking:
> 
>   If any of the SIGFPE, SIGILL, SIGSEGV, or SIGBUS
>   signals are generated while they are blocked,
>   the result is undefined, unless the signal
>   was generated by the kill() function, the
>   sigqueue() function, or the raise() function.
> 
> Under ``2.4 Signal Concepts'', for SIG_IGN:
> 
>   SIG_IGN 
> 
>   Ignore signal. 
> 
>   Delivery of the signal shall have no effect on
>   the process. The behavior of a process is undefined
>   after it ignores a   SIGFPE, SIGILL, SIGSEGV,
>   or SIGBUS  signal that was not generated by kill(),
>   sigqueue(), or raise().
> 
> So, as I suspected, there are in fact no requirements
> from the applicable spec. Infinite looping or
> stopping the process anyway are conforming responses,
> as is rebooting or halting the machine with a
> ``panic'' message. 

I'd not go quite as far as that but execve("/usr/bin/nethack") certainly
would be acceptable.

  Ralf

  reply	other threads:[~2009-06-26  0:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 21:45 Silly 100% CPU behavior on a SIG_IGN-ored SIGBUS Kaz Kylheku
2009-06-23 21:45 ` Kaz Kylheku
2009-06-23 22:03 ` David Daney
2009-06-25  3:39   ` Kaz Kylheku
2009-06-25  3:39     ` Kaz Kylheku
2009-06-23 22:44 ` Kevin D. Kissell
2009-06-25 13:13   ` Ralf Baechle
2009-06-25 13:45     ` Ralf Baechle
2009-06-25 16:00       ` Kaz Kylheku
2009-06-25 16:00         ` Kaz Kylheku
2009-06-26  0:45         ` Ralf Baechle [this message]
2009-06-26  0:52           ` David Daney

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=20090626004527.GA3235@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=KKylheku@zeugmasystems.com \
    --cc=kevink@paralogos.com \
    --cc=linux-mips@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.