From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: SIGIO using UDP sockets just hangs (permantely blocks) socket I/O.
Date: Tue, 10 Oct 2017 09:58:00 -0000 [thread overview]
Message-ID: <20171010095832.GA20561@calimero.vinschen.de> (raw)
In-Reply-To: <embecdb725-8b17-4963-84ed-12e570da7532@str-c>
[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]
On Sep 30 11:50, tvonderhaar wrote:
> Dear cygwin_list,
>
> 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=0" 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:
>
> set_io_async(udp_socket_fd,call_back,SIGIO,FALSE);
> /*FASLE defined as '0' and SIGIO as defined by CYGWIN.*/
>
> 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
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2017-10-10 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-30 12:53 tvonderhaar
2017-10-10 9:58 ` Corinna Vinschen [this message]
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=20171010095832.GA20561@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).