Web lists-archives.com

Re: SIGIO using UDP sockets just hangs (permantely blocks) socket I/O.

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature