Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <384294A8.45E14D42@vinschen.de> Date: Mon, 29 Nov 1999 15:58:48 +0100 From: Corinna Vinschen X-Mailer: Mozilla 4.6 [en] (WinNT; I) X-Accept-Language: de,en MIME-Version: 1.0 To: david Depere CC: "'cygwin AT sourceware DOT cygnus DOT com'" Subject: Re: Problem URGENT with the argument F_SETOWN in the function fcntl References: <01BF3A76 DOT DBE03880 DOT ddepere AT cr2a-di DOT fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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