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://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: | <40BAC273.C5333D0C@dessent.net> |
Date: | Sun, 30 May 2004 22:28:19 -0700 |
From: | Brian Dessent <brian AT dessent DOT net> |
Organization: | My own little world... |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Problem with select() function, works under normal Linux |
References: | <053120040240 DOT 9336 DOT 40BA9B2B000D83BD000024782200734840C0CF9D0A0B0E0AAD0A08AB AT comcast DOT net> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
TheReader06 AT comcast DOT net wrote: > Like the subject says, I'm having trouble with select() under Cygwin, when it works under RedHat 9 and Fedora Core 2 FINAL. The output is shown below for both. And a bit of code at the bottom. In general you will find that just because something works on linux doesn't mean it's correct or portable to other POSIX systems. > int maxfd; > ... > maxfd = 300; > ... > if (select(maxfd + 1, &readSet, (fd_set *)0, (fd_set *)0, NULL) < 0) What in the world is this 300? Why not try passing FD_SETSIZE instead? In cygwin FD_SETSIZE is 64 by default unless you redefinite it before including the headers. You're telling select to examine 301 handles but you're only passing a data structure that holds 64... Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |