Re: Pthreads signals



On Wed, 28 Mar 2007, Steve Watt wrote:


In <Pine.GSO.4.64.0703281615540.14519@xxxxxxxxxxxxx>,
Daniel Eischen <deischen@xxxxxxxxxxx> wrote:
On Wed, 28 Mar 2007, Peter Holmes wrote:

How do signals work with pthreads in FreeBSD. How are process signals
delivered?

The best explanation of signals and threads in general
is in the POSIX spec, or Butenhof's book.

http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html

I suspect the question was rather more specific than that, due to
bad experiences with LinuxThreads. Does FreeBSD have a proper
signal delivery model, where thread masks are per-signal, and signals
sent to the process when all threads within the process have the
signal blocked remain pending against the process so any thread may
accept the signal using sigwait()/sigtimedwait()/sigwaintinfo().

These are POSIX threads, so if things don't behave as
specified by or as allowed by the standard, a bug report
should be filed.

--
DE
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [Resend PATCH AIO 1/2] Add AIO completion notification
    ... Does it say anything about the reliability of that signal delivery? ... POSIX AIO being part of the realtime POSIX extension, ... It looks like this is trivial to make fail if one submits more ... operations than the RLIMIT_SIGPENDING rlimit will allow queued signals ...
    (Linux-Kernel)
  • Re: [Resend PATCH AIO 1/2] Add AIO completion notification
    ... The POSIX specification ... Does it say anything about the reliability of that signal delivery? ... operations than the RLIMIT_SIGPENDING rlimit will allow queued signals ... compat copies of every sigevent on the stack like compat_sys_io_submit ...
    (Linux-Kernel)
  • Re: [take24 0/6] kevent: Generic event handling mechanism.
    ... example - it perfectly ok lives with relative timeouts provided to ... schedule_timeout- the same is done in kevent. ... registering a signal for kevent delivery). ... signals is not updated for special kevent signals. ...
    (Linux-Kernel)
  • Re: [PATCH] generic signal code (small new feature - userspace signal mask), kernel 2.6.16
    ... I've seen this feature in other *nix kernels but always done with the mask kept on some sort of syspage shared between user and kernel space, at a fixed address but contents local to each thread. ... You _could_ try to make it do something special at signal delivery time, ... it would be possible to block all signals ...
    (Linux-Kernel)
  • Re: most signals not being delivered to processes
    ... On Mar 26, 2009, at 12:40 PM, Ian Rose wrote: ... most signals are not being delivered to processes. ... For example, if I run 'sleep 10' from the shell, ctrl-c won't interrupt it. ... For a signal to work, the OS does deliver it to the process, which must be in a runnable state or else delivery will block until the process has returned from a system call or whatever is blocking it. ...
    (freebsd-questions)