Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653402

Re: signals: Bug or manpage inconsistency?

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: signals: Bug or manpage inconsistency?
Date 2017-05-30 19:10 +0200
Message-ID <tMSOC-1GK-13@gated-at.bofh.it> (permalink)
References <tMPnI-7TL-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, May 30, 2017 at 6:21 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Linus, any recollection?
>
> IMO, it's perfectly reasonable to discard ignored signals even when the
> signal is in the blocked mask. When its unblocked and SIG_IGN is replaced
> then the next signal will be delivered. But hell knows, how much user space
> depends on this weird behaviour by now.

Is there any real reason you care? Because clearly we're doing what
POSIX allows, and I'd be nervous about changing existing behavior.

There are various races wrt signals that happen particularly around
fork/exec, and the way that programs handle those races is to block
signals. I don't know that anybody cares about the exact semantics of
this, but I could *imagine* that they do.

Our current behavior is actually very nice: blocking a signal
basically guarantees that you're now "atomic" wrt that signal. You
won't lose signaling events after the blocking, unless you explicitly
throw them away.

So I would suggest *not* changing the semantics unless you have a
major real reason for wanting to do that.

                     Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

signals: Bug or manpage inconsistency? Thomas Gleixner <tglx@linutronix.de> - 2017-05-30 15:30 +0200
  Re: signals: Bug or manpage inconsistency? Thomas Gleixner <tglx@linutronix.de> - 2017-05-30 18:20 +0200
    Re: signals: Bug or manpage inconsistency? Oleg Nesterov <oleg@redhat.com> - 2017-05-30 19:10 +0200
      Re: signals: Bug or manpage inconsistency? Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-30 19:20 +0200
        Re: signals: Bug or manpage inconsistency? Oleg Nesterov <oleg@redhat.com> - 2017-05-30 21:20 +0200
        Re: signals: Bug or manpage inconsistency? Thomas Gleixner <tglx@linutronix.de> - 2017-05-30 23:00 +0200
          Re: signals: Bug or manpage inconsistency? ebiederm@xmission.com (Eric W. Biederman) - 2017-05-31 03:00 +0200
            Re: signals: Bug or manpage inconsistency? ebiederm@xmission.com (Eric W. Biederman) - 2017-05-31 03:20 +0200
  Re: signals: Bug or manpage inconsistency? Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-30 19:10 +0200
    Re: signals: Bug or manpage inconsistency? Thomas Gleixner <tglx@linutronix.de> - 2017-05-30 21:40 +0200
      Re: signals: Bug or manpage inconsistency? Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-30 22:00 +0200
        Re: signals: Bug or manpage inconsistency? Thomas Gleixner <tglx@linutronix.de> - 2017-05-30 23:10 +0200
  Re: signals: Bug or manpage inconsistency? "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-05-31 09:00 +0200
  Re: signals: Bug or manpage inconsistency? ebiederm@xmission.com (Eric W. Biederman) - 2017-06-01 09:10 +0200

csiph-web