This is the mail archive of the cygwin@cygwin.com 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]

Is fcntl fully implemented in cygwin?



Hi,

I am implementing a socket layer using cygwin, and want to
have non-blocking socket i/o.  To get a SIGIO siganl from O/S,
I need to set the process id for a socket. But everytime
fcntl is invoked, it returns -1. What is the problem? and what
are the solutions ? Here is my code snippet.

...
if (fcntl (ether_file, F_SETFL, FASYNC | O_NONBLOCK) < 0) {
    return errno;
}
if (fcntl (ether_file, F_SETOWN, getpid ()) == -1) {
    printf ("ERRNO %d\n", errno);
    return errno;
}
...

And I am getting "ERRNO 22" ...

thanks for help.

-wooyoung

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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