Mail Archives: cygwin/1999/11/29/10:09:04
Hello David,
david Depere wrote:
> The function fcntl used with the argument F_SETOWN return a value of -1 and the errno indicate that
> "the argument is invalid".
> However in the include file fcntl.h, this argument exist. (#define F_SETOWN 6 /* Set owner - for ASYNC */ )
> Do you have found this problem already?
F_SETOWN is in no way supported by Win32 so it's not possible to
implement it. Nevertheless it's defined by POSIX, so it's part of
the header. Maybe, it should be erased there...
But:
> fdsock = socket (AF_INET, SOCK_DGRAM, 0);
> [...]
> arg = getpid();
> fcntl(fdsock, F_SETOWN, arg); /* PROBLEM */
Why do you do this? Your process has created the socket, so it _is_
already the owner?!?
If your app should be portable, simply write:
#ifndef __CYGWIN__
fcntl(fdsock, F_SETOWN, getpid()); /* NO PROBLEM ANYMORE */
#endif /*__CYGWIN__*/
Corinna
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -