delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <3D866607.9040707@etr-usa.com> |
Date: | Mon, 16 Sep 2002 17:15:19 -0600 |
From: | Warren Young <warren AT etr-usa DOT com> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 |
X-Accept-Language: | en-us, en |
MIME-Version: | 1.0 |
To: | Cygwin-L <cygwin AT cygwin DOT com> |
Subject: | Re: socket() function fails when application runs as an NT service. |
References: | <Pine DOT GSO DOT 4 DOT 44 DOT 0209160238580 DOT 21486-100000 AT slinky DOT cs DOT nyu DOT edu> <012201c25d4e$4ba8ef70$010310ac AT lyoncleitienne> |
Christophe LEITIENNE wrote: >> > I think 0 is a valid socket descriptor. -1 is not. True. It may also be helpful to call WSAGetLastError(). I realize that you're probably running under Cygwin for POSIX compatibility, but adding this temporarily to ask Winsock "why" it returned an error can be illuminating. Since one possible result is "there is no error", you will want to call WSASetLastError() with 0 to make sure you don't get an older error code, since Winsock doesn't reset the error variable after a successful call. -- = Winsock Programmer's FAQ: http://tangentsoft.net/wskfaq/ -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |