From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129473 invoked by alias); 10 Oct 2017 09:58:37 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 129456 invoked by uid 89); 10 Oct 2017 09:58:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-101.9 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*R:D*cygwin.com, dear, Dear, H*c:application X-HELO: drew.franken.de Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Oct 2017 09:58:35 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id 40F6A71B18980 for ; Tue, 10 Oct 2017 11:58:33 +0200 (CEST) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id 81D8D5E03B0 for ; Tue, 10 Oct 2017 11:58:32 +0200 (CEST) Received: by calimero.vinschen.de (Postfix, from userid 500) id 74039A80666; Tue, 10 Oct 2017 11:58:32 +0200 (CEST) Date: Tue, 10 Oct 2017 09:58:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: SIGIO using UDP sockets just hangs (permantely blocks) socket I/O. Message-ID: <20171010095832.GA20561@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-SW-Source: 2017-10/txt/msg00092.txt.bz2 --huq684BweRXVnRxX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1512 On Sep 30 11:50, tvonderhaar wrote: > Dear cygwin_list, >=20 > I have tried to get signals working with UDP bound sockets. I have > tried every combination and order of the included code, but once I > ioctl() the socket with "FIOASYNC" I get one signal from the socket and > the previously "FNDELAY" set socket blocks forever on a call to > recvfrom(). I can detect the block with a select, but it never becomes > ready. This code works flawlessly on Linux and in the past worked on > SUN,HP- UX(I remove the HP specific code) and Alpha OSes. If I don't > perform the ioctl() with "FIOASYNC" or perform a second call to ioctl() > with the "set_state=3D0" the socket does not block as expected, but I of > course I don't get my SIGIO signal. Note: I make the call to the > function as follows: >=20 > set_io_async(udp_socket_fd,call_back,SIGIO,FALSE); > /*FASLE defined as '0' and SIGIO as defined by CYGWIN.*/ >=20 > I only found one google search of an individual attempting non-blocking > asynchronous() I/O and they indicated it worked using this code sequence > under CYGWIN. "FASYNC" has no affect on CYGWIN using fcntl() as after FASYNC/O_ASYNC is not supported at all by Cygwin and never was. Signal-driven IO was never very high on the wishlist, so it wasn't fully implemented. What about using select from another thread instead? Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --huq684BweRXVnRxX Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZ3JnIAAoJEPU2Bp2uRE+gy4wP+wT22z8IkWH0mfQck+FKkL3q M62TuFNBj+sP4ZnYOKWxo5BFKalUNg/TuPE2moQR2v4nQIm6kOB3pw2eL9P6ayIG HieQyFMHO58Z+7zVpUDCOWuc1N6UchKQHy9qmqr04iG7EgW52/T1a5YgtHVteChb jHbzNao9VLn/97QJefwsC3yLA4fg1c9gz644eNS9BWT//YNtpRpVIjnX6RRTTbv6 yMifUvwKSs5py+WxVdDbrO/5OZOLfRFV3+MgvKN5oxrqL2S+uNzSybZZXg1Sd4Cy AdSs9hHbjCi57WE5YZ56w06eStcqKR+kEaWe7WWm58SW7hK132v90Kw42lPHO1AI kzTBCrhi1QhCqIsKmzL06RnKOhpOvR4dODiE5GueWdGpmUxf/9MNP1Nl5+bQB1EN 1iJKh+X0U0FWfSPov+Yg0sCcDRlPL893IPeO+Nt0QqprzFmkw3trcR8Eax7B4Lrt lih/UntqitYAzXh6yiNGz/Bc6i1WJcC/mIixZ+bUabYGAvYGrVA8WpZog4r4/54P VbM7IhCVhgPhGsOg2PYPVzq3pPDbWP5oDlK4OCcbe66amMGWq93I95huiF4X8KRx wJUfga7ICnSADArjG1H0K4yMRM5U8BaJ2HJAZ4UYIshgS88hsviwhPhTTP5ti1xt f/0Fj9ny4xyM3FC5Cmra =evyY -----END PGP SIGNATURE----- --huq684BweRXVnRxX--