mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Proposed new cancellation type
Date: Wed, 8 May 2013 10:54:31 +0200	[thread overview]
Message-ID: <20130508085431.GC12689@port70.net> (raw)
In-Reply-To: <20130508005729.GA17495@brightrain.aerifal.cx>

* Rich Felker <dalias@aerifal.cx> [2013-05-07 20:57:29 -0400]:
> 
> 1. With normal cancellation, when the cancellation request is acted
>    on, cancellation is disabled, so that further calls to cancellation
>    points in the cleanup handlers don't in turn get cancelled. Would
>    it make sense for only the _first_ cancellation point called to
>    fail with ECANCELED (and after that, for cancellation to remain
>    disabled)? Or should all fail until it's explicitly disabled?
> 

i think libraries should be prepared for this
ECANCELLED either way

- first only strategy:

eg in fflush(0) several blocking syscalls
are made in a loop, it should return when
ECANCELLED is detected to avoid further
blocking

another issue is that the failure of some
cancellation points are not reported by
libraries: eg close is a cancellation point
but its failure is usually not treated as
an error so cancellation can be unnoticed

- cancel everything strategy:

libraries that try to act on errors
(eg log some error message) will
fail to do so, which can be bad if the
cleanup code of the library requires
blocking calls


  parent reply	other threads:[~2013-05-08  8:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08  0:57 Rich Felker
2013-05-08  7:35 ` Jens Gustedt
2013-05-08 18:07   ` Rich Felker
2013-05-08  8:54 ` Szabolcs Nagy [this message]
2013-05-08 19:17   ` 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=20130508085431.GC12689@port70.net \
    --to=nsz@port70.net \
    --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).