X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=kNu AW0L7H9DyDImLYhD5jPSYwthQckE330Z54mGIfRd/NdQdbeJU1qb9eoLwM4//5Vx FTQUzwM008/+U+BlEBaNhwJV9juSrZCn+W8wl4feLfgPjOsajKBzTH3WqE0NClQH m6kNmqsFUmQW+H91qkdlVduv18r82AZb2ggt8VCQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=h026YgVja +NvUyWAy+959Qpkkcs=; b=d0zIAK1JCt/aftjU6hYSbiW0awFM1egMaH628PqvC 0QOIys3ya8Y9fOx1VgLaSM1+wpwg8suJ6+JuccfnaN7xt56qpHvhts6rWpMZdJTf Psl3by3XeZpRzNVMExdCuaxW/rZwmETd8IcCoZZAl6XFimHJK7qJnDeS3j7STTjr 5A= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-exchange-antispam-report-cfa-test:6040130, Hx-exchange-antispam-report-cfa-test:6043046, Hx-exchange-antispam-report-cfa-test:6041072, H*MI:outlook X-HELO: na01-bn1-obe.outbound.protection.outlook.com From: Steven Bardwell To: "cygwin AT cygwin DOT com" Subject: FD_SETSIZE and sizeof(fd_set) Date: Wed, 22 Jun 2016 22:19:20 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=SBardwell AT lbmsys DOT com; x-ms-office365-filtering-correlation-id: 712b0a72-9d49-40f1-3671-08d39aeb4218 x-microsoft-exchange-diagnostics: 1;DM3PR18MB0844;6:Vb2J60Mwk9OVW1kgFRwM269rzixYDfOLa8KMxW18VL39duTp+6nta1ErH4zXVeS4yLLn8C7ipNWDp97YPRqvbXhqpl0Khusyxodt3mPH6XrkCYim/LHDrLQDoF4l1zCK47t2bWVLZABS6SiHIP4+Qci3lNPdQguezi0yUDjV+aZUe5E2mjFelbArissGyy64+0mQpImbi1yYdS6nebaqX5Gr8ukLjS998Vug5BMMLWFprYP3htdvY0LqKsDoDp79Ry2saBkG8RWp8nPgo2nvDdCZzrPxJAGh7b++YsezkX0/0eRpEM47zfWZ2TkZFNooCA3HZEqC5I2OChEt1VrFfQ==;5:09paZeBhOpErLCvXbsUq+Qti2UPMRUS9VV7VkdazaCB7m4nLyhqQDoPqxdgUWoT7R+ZInqVgK8Q86yrOCYIDnMnMnmXzmu8fn39+AxQeVhLz4fcxxUYaJfi5cJwZNlpYR6sBnRyp2owDIz+R8YlqwQ==;24:9UE2FuMR1h0VmEUPWjc6zzqOTWONxyc7xjgI9xGz+TiFHmNTGjVe9kgAIT9UqufwndsDJyrOrYyufRk2jRJlNLvUnwziC89xsz37hPsIJ8I=;7:jl3QPzoPxXW0wu8FAa0bxI+uD6sepcvOFOxMT9RmJ3lIzTBxA5Paa5yG+qEb7sELkZMq+OX8O9e59OGRJ9lFngdBGNfa/ZBkISWUDwYGtFU5fwsnxXxQDU8Iw9hhzlJvEO11uMrmKMFz+VIJ9btSxFv0pkDle7B/VH7sSzHF2iOhO2T9O3J+7W6nTktaKOa1q7Kq+jm3y+eo75ErW9OHkDnSXvivITvRQl5bMFTJnEeShYZCDGDabBpeZ1wpdtZ/jdMpD7xOLAWbzrVbKpl50g== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR18MB0844; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041072)(6043046);SRVR:DM3PR18MB0844;BCL:0;PCL:0;RULEID:;SRVR:DM3PR18MB0844; x-forefront-prvs: 0981815F2F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(189002)(199003)(6116002)(2900100001)(50986999)(3660700001)(2501003)(74316001)(2351001)(102836003)(586003)(110136002)(3846002)(122556002)(107886002)(229853001)(92566002)(8936002)(7736002)(305945005)(54356999)(5003600100003)(11100500001)(5640700001)(66066001)(3280700002)(77096005)(2906002)(97736004)(76576001)(87936001)(80792005)(7846002)(189998001)(81166006)(9686002)(86362001)(1730700003)(8676002)(106356001)(99286002)(68736007)(10400500002)(105586002)(33656002)(5002640100001)(450100001)(101416001)(7696003)(81156014);DIR:OUT;SFP:1102;SCL:1;SRVR:DM3PR18MB0844;H:DM3PR18MB0841.namprd18.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: lbmsys.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: lbmsys.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jun 2016 22:19:20.4835 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2cb46dcc-5f81-474e-b16b-96065648dbca X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR18MB0844 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u5MMJjGD009616 I am running into a problem with the fd_set structure that someone may know the answer to. I would like to be able to call select() on more than 64 open files, so I have done the following: 1) the include section of the program has the code: #undef FD_SETSIZE #define FD_SETSIZE 256 #include 2) however, when I query the size of the fd_set structure, sizeof(fd_set) return 8 bytes. This obviously breaks things when the fd is greater than 64. Is there a proper way of supporting more than 64 open files in a process? I am guessing there is an easy answer -- if not, I can supply sample code that shows the problem. Steve Bardwell -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple