[lkml]   [2003]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Question about threads and signals
    Hash: SHA1

    Jamie Lokier wrote:

    > 1. If a signal is delivered to a thread, is it masked for the duration of
    > the handler in (a) just that thread or (b) all threads?


    > In other words, if I have 3 threads and SIGIO is not blocked in any
    > of them, is it possible for my SIGIO handler to be called up to 3
    > times concurrently? Or is the blocked mask somehow shared?

    Masks are never shared.

    > Is the same thing true of SIGCHLD? SIGSEGV?

    Yes. Up to the point where a fatal signal isn't caught and the process
    is killed. At that point all threads except the one responsible for the
    termination is stopped and then terminated.

    > 2. Is this true of POSIX threads in general, or just Linux?

    Well, the above is what POSIX requires and what I think we've
    implemented. These requirements are essential for programs which do
    much of their work in signal handlers. Creating more threads which
    mainly just sit around but can react to signals is a valid programming

    - --
    - --------------. ,-. 444 Castro Street
    Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
    Red Hat `--' drepper at `---------------------------
    Version: GnuPG v1.2.1 (GNU/Linux)

    -----END PGP SIGNATURE-----

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:32    [W:0.023 / U:33.132 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site