From owner-freebsd-questions Tue Apr 9 21:17:07 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA20997 for questions-outgoing; Tue, 9 Apr 1996 21:17:07 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id VAA20988 for ; Tue, 9 Apr 1996 21:17:03 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id OAA20796; Wed, 10 Apr 1996 14:13:03 +0930 From: Michael Smith Message-Id: <199604100443.OAA20796@genesis.atrad.adelaide.edu.au> Subject: Re: select question To: marc@bowtie.nl (Marc van Kempen) Date: Wed, 10 Apr 1996 14:13:02 +0930 (CST) Cc: questions@FreeBSD.org In-Reply-To: <199604092143.XAA11392@nietzsche.bowtie.nl> from "Marc van Kempen" at Apr 9, 96 11:43:53 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Marc van Kempen stands accused of saying: > > tm.tv_sec = 0; > tm.tv_usec = timeout; /* timeout to wait for reply */ > FD_ZERO(&readfds); /* clear the read filedescriptor set */ > FD_SET(_comfd, &readfds); /* select the _comfd to wait for */ > if (select(1, &readfds, NULL, NULL, &tm)) { The '1' should be _comfd+1. > Are there any settings of the filedescriptor that will influence > the select behaviour? Or am I overlooking something else? Hmm. The manpage, perhaps. 8) > Marc van Kempen BowTie Technology -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[