www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; q=dns; s=default; b=XWhx | |
wkJ/6oS1aTlTYsRt0ioOnawLCn4dwxDjHHOMrs2tBwWyeIWbdEFMk3KWzzbt+bSE | |
Ggx/Q9BM28MnKbxl2KqW0rf8dWJiUPAQutYMWfYin5EvpGwVJiY7V3L2IrgeckcV | |
c2e5evP4TBcEA+rjtNrSHSoGhYyYwQVNWsRA5wY= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; s=default; bh=SMuUOgdsLa | |
oEgyklL0HiUn4Hk08=; b=O9qcjSo6cpXZgSOvCEnngDFx1CK/sXIwjmvAem4mLw | |
5wJoDKzMudNPtGsxBNsGqMjm9oP6CHa3aCQb+J7h/usVLLMYo7AIYxHF74XGBxaa | |
wpu21F2Xh1fUgKxwrN9m6fVxLA6lB0NXzjwIyfui3NvmX0bSEOI4v04xgiHOz2jA | |
g= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=principal, DOES, expires |
X-HELO: | mx1.redhat.com |
Subject: | Re: Is async-signal-safety applicable to Cygwin? |
To: | cygwin AT cygwin DOT com |
References: | <f80444ec-69b9-0177-dd75-c994092380fd AT gmail DOT com> |
From: | Eric Blake <eblake AT redhat DOT com> |
Openpgp: | preference=signencrypt |
Message-ID: | <9e5ce156-19c2-8379-6e29-8997c1700d5b@redhat.com> |
Date: | Tue, 19 Mar 2019 09:35:19 -0500 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
MIME-Version: | 1.0 |
In-Reply-To: | <f80444ec-69b9-0177-dd75-c994092380fd@gmail.com> |
X-IsSubscribed: | yes |
--7V9SnJ5MdHGL2Mu7723BekRxN10c6iJI5 Content-Type: multipart/mixed; boundary="BIemsF0heglGvAWvjVab8Ih3xZ3pT2odR"; protected-headers="v1" From: Eric Blake <eblake AT redhat DOT com> To: cygwin AT cygwin DOT com Message-ID: <9e5ce156-19c2-8379-6e29-8997c1700d5b AT redhat DOT com> Subject: Re: Is async-signal-safety applicable to Cygwin? References: <f80444ec-69b9-0177-dd75-c994092380fd AT gmail DOT com> In-Reply-To: <f80444ec-69b9-0177-dd75-c994092380fd AT gmail DOT com> --BIemsF0heglGvAWvjVab8Ih3xZ3pT2odR Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/19/19 9:28 AM, LRN wrote: > ASS[0] is documented for Linux (and for POSIX) but i'm failing to find any > information on how this applies to Cygwin. I assume, since there are no "= real" > signals on Cygwin, that it's not possible for a signal handler to break t= he > state of some function that happened to be executed when the signal handl= er was > triggered. But i could be wrong. You are wrong. It IS applicable. Cygwin has signals and signal handlers; although Windows may not have POSIX signals as such, it DOES have the ability to interrupt a process mid-function when a timer expires, and cygwin's implementation of signals on top of the semantics that windows provides can indeed result in interrupting the middle of a non-async-safe function. Hence, a signal handler that calls a non-async-safe function at the same time that the signal has interrupted another non-async-safe function is indeed observable on Cygwin and can indeed result in deadlocks (a classic example being the case if you malloc() from a signal handler that interrupted an ongoing malloc() call). --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --BIemsF0heglGvAWvjVab8Ih3xZ3pT2odR-- --7V9SnJ5MdHGL2Mu7723BekRxN10c6iJI5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlyQ/icACgkQp6FrSiUn Q2pSVQgAj2HYJjXqfmgL+BZnT/hpBr0RD1N0Vd+u4mofGq8k1n8aCSa5P8Qyf6Op o8S/kQ5hAo6VCsQuxW+pW4zWvxO10wPzN9b3C410Ao3PPUsStqhAzSDP60T+b2Nx nPDd9BhiQjNNXyYCHWkt2Q3x5gkO2i51jKVIDJ6DAp/L+m0Yn/7zVV5CpY1w+fZ9 nf8ZSlOsezbV9m4EcVR0p4VCLA9qTitfGUNK+zZNbQeZLXcyVCXZ9NgH/ZeTo41w lqr4x/idcokR31EnYJHmwuC89SzXwkgtv8+L4Fy7VWkvl2JqeEE1vGR5oEK89ZO2 Dk64YTCwAXOvfugN7Tg72agogyDe5A== =LeYy -----END PGP SIGNATURE----- --7V9SnJ5MdHGL2Mu7723BekRxN10c6iJI5--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |