This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


    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

Attachment: sigio.c
Description: Binary data

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]