mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: sigaltstack for implementation-internal signals?
Date: Wed, 06 Mar 2019 18:21:40 +0100	[thread overview]
Message-ID: <87o96napgb.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <20190306155421.GR23599@brightrain.aerifal.cx> (Rich Felker's message of "Wed, 6 Mar 2019 10:54:21 -0500")

* Rich Felker:

> For pthread_cancel, it's asynchronous. The signal can be blocked if
> the cancellation signal handler has already run and determined that it
> should not act on cancellation (disabled or not at a cancellation
> point); in that case, it re-raises the signal and leaves it pending,
> so that, if the determination was made while the thread was executing
> a signal handler, it can re-evaluate when the signal handler returns
> (possibly into restarting a blocking syscall that's a cancellation
> point). I don't see any easy way to make this synchronous with respect
> to the thread calling pthread_cancel, but maybe there is by breaking
> it down into cases and using more than one signal.

phtread_cancel is slightly different; I think think we can send a signal
for that.  It can't be made synchronous because if we block the
canceling thread while the canceled thread unwinds (running cancellation
handlers), we will probably end up introducing deadlocks involving
application locks.

Thanks,
Florian


  reply	other threads:[~2019-03-06 17:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 15:57 Rich Felker
2019-03-06 12:56 ` Florian Weimer
2019-03-06 15:54   ` Rich Felker
2019-03-06 17:21     ` Florian Weimer [this message]
2019-03-06 18:03       ` Rich Felker
2019-03-06 16:07   ` Markus Wichmann
2019-03-06 16:25     ` Rich Felker
     [not found]       ` <20190306171119.GG28106@voyager>
2019-03-06 18:20         ` Rich Felker

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=87o96napgb.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).