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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=huGDjMfDXSKkxYV7k8PBkZHSmMbkYD/6ELdhipssyfZlBBYDy/mHn | |
kpuC5rMhkqe3WL0hiU8KGoLcMtXuTGXgRsbZ7VeDQQq+E4OIKSPszCCVchot8KRF | |
RyKdXX9aLNPclCyAxH7Km7b4nDE9kXcZgB0lN4vJ5XvDZYbojN56Kg= | |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=K7PNFNixZyfhq+2m42zxgNNH4cs=; b=tQF8bg1ULxe7Bbjput057G0KqFs/ | |
y9G1WyByuJ3nQT7UpStMnqPhAE25LVj+hW56ZIIZ4r+FeXzzuXAWDaFgjcANzpK7 | |
am7Rr8ovrKblQ40K1+NQMRLj/XwZGsv2mcEjrzBymrwCeOfq9YVW3ch03IzmwIIr | |
Lb2CDjOP7HfIl/4= | |
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=-106.4 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2042, solved, H*F:D*cygwin.com |
X-HELO: | mout.kundenserver.de |
Date: | Mon, 2 Mar 2020 17:07:42 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Incorrect behavior in TIOCINQ ioctl |
Message-ID: | <20200302160742.GR4045@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <d6a35f8b-3e4d-c8c6-4d3c-f15ccd72866d AT gmail DOT com> <20200228192330 DOT GN4045 AT calimero DOT vinschen DOT de> <09e4b16c-a4fb-4062-1d29-a92a916f186b AT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <09e4b16c-a4fb-4062-1d29-a92a916f186b@gmail.com> |
--1y/7ip9Z0l6NTTti Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 29 11:37, =C3=85ke Rehnman wrote: >=20 > On 2020-02-28 20:23, Corinna Vinschen wrote: >=20 > > - Is it a safe bet that ClearCommError returns valid values in > > st.cbInQue even if one of the error conditions occur? Maybe the > > right thing to do is to return 0 in certain error cases...? >=20 > The win32 api=C2=A0 documentation does not mention anything about not ret= urning > proper device status as long as the function succeeds... >=20 > Anyhow in my pursuit for the truth I whipped up a small test program and > strace:d it (with some extra debug printout in fhandler_serial::ioctl) >=20 > =C2=A0127 2403456 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D ioc= tl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D7 > =C2=A0 216 3406481 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D io= ctl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3DE > =C2=A0=C2=A0 90 4409676 [main] python2.7 1662 fhandler_serial::ioctl: 0 = =3D ioctl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D15 > =C2=A0 141 5413027 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D io= ctl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D1C > =C2=A0 129 6416204 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D io= ctl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D23 > =C2=A0 121 7419254 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D io= ctl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D2A > =C2=A0 203 8423829 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D io= ctl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D31 > =C2=A0=C2=A0 89 9427183 [main] python2.7 1662 fhandler_serial::ioctl: 0 = =3D ioctl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D38 > =C2=A0 131 10431271 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D i= octl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D3F > =C2=A0 118 11435254 [main] python2.7 1662 fhandler_serial::ioctl: 0 =3D i= octl(541B, > 0xFFFFBCB0) ev=3DC st.cbInQue=3D46 >=20 > >=20 > > - Did you actually try if this fixes your problem? It's pretty > > simple to build the Cygwin DLL > > https://cygwin.com/faq.html#faq.programming.building-cygwin >=20 > I patched it yesterday and it solved the problem... >=20 > /Ake I pushed a patch. Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer --1y/7ip9Z0l6NTTti Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl5dL04ACgkQ9TYGna5E T6Cqlg/+KszZt+q0S+zEs7Rrfnm971VVrqfP9r2WJYXn2BUemDrfBufrXYGhNk3X xIXP5RfONEEt60IedxYS4WxJU2mogxkGN18SUiG7kcpUJNTjXNWVN94ppLfZOW/d zqS4Zi/mGFEz3G2tGZdHaRoBnDEzZdqUFWv/46SmqVxOGRPl6xxuhBhfbITKS73m v+OmMhbQH6OQ4Akkl8s5Kgq4ADIe79lU7/QqDmj9smy0X4HOAds6nZfC1RI0DhvX RECKcL+jlQ52f/b+/a7pi3BxGWruUhCaJmTiGpDW7ddGAdN17SRaoEBygOYW7jSq WinDukCtPxJ0RxVHNXKysvj71nAP/EGcOT6A7Z3j1V5JzcUvxUsyj6OOJLj8QiE1 rqoWSMklCcw3Sd/vQ+Akwp+hsuZzgcxUcBteA00YglE35IZ1Ysa6qN8P+liJNpPU CFqrEnxnLWFJl/EdtOfw4OBUb8LfUsPzmYbooVdBNPqhDDwVAYDCS80OurxZHgYt 60z5VQ7bsJa0CGLwYtS+HRmz95Hg884OdIe6fkwobi4b+N0ZaDIP8fyP6iA0cRzd vGeW8dmWBiSvew38KytROFnAz+zcdJeG0mehSusDnYLzfrKT8x33TUl/fy6vGweY uFhyAGGeIIEaYY1SqPV8lh+aarbqJQk43IAGQjM8ayXKcwVhRyo= =Sdtg -----END PGP SIGNATURE----- --1y/7ip9Z0l6NTTti--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |