From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 8 01:14:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2A6A1065673 for ; Fri, 8 Aug 2008 01:14:34 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id B4C218FC0A for ; Fri, 8 Aug 2008 01:14:34 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m781EXB12232; Thu, 7 Aug 2008 18:14:33 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m781EXk17375; Thu, 7 Aug 2008 18:14:33 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Thu, 7 Aug 2008 18:14:33 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Chuck Robey In-Reply-To: <489B9D4D.4010009@telenix.org> Message-ID: References: <489B9D4D.4010009@telenix.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD-Hackers Subject: Re: read with timeout ?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2008 01:14:34 -0000 On Thu, 7 Aug 2008, Chuck Robey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have my head lost in a code problem. I just hit a point where I need to do a > read from an fd, but I need to associate it with a timeout, on the order of 1 > second, something like that. I had the feeling that there's a function in > FreeBSD's libc that makes that simple, but I forget the function name. If > anyone can remember something like what I'm talking about, I sure would > appreciate a function name. I can figure out how it works, if I could only > dredge up that name. man 2 select -- Nate Eldredge neldredge@math.ucsd.edu