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

tvonderhaar tlvonderhaar@gmail.com
Sat Sep 30 12:53:00 GMT 2017


     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
setting that flag with "F_SETFL" and reading the flags back with
"F_GETFL" the flag is not set.

     Some help would be appreciated. I know some feel signals are
obsolete but I don't and I have used them over for 20+ years. Thanks.

       Tom

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigio.c
Type: application/octet-stream
Size: 4118 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20170930/b59bbf86/attachment.obj>
-------------- next part --------------

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list