From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 3 19:45:18 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 5225B16A478 for ; Thu, 3 Jan 2008 19:45:18 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.freebsd.org (Postfix) with ESMTP id 2E85C13C457 for ; Thu, 3 Jan 2008 19:45:18 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141] (may be forged)) by mxout4.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.09) with ESMTP id m03Jj4gm011213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Jan 2008 11:45:04 -0800 X-Auth-Received: from dzihan.cs.washington.edu (dzihan.cs.washington.edu [128.208.4.96]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.09) with ESMTP id m03Jj4lB016348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 3 Jan 2008 11:45:04 -0800 Message-ID: <477D3B40.9020805@u.washington.edu> Date: Thu, 03 Jan 2008 11:45:04 -0800 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.6 (X11/20071003) MIME-Version: 1.0 To: Metin KAYA References: <1571995824.20080103205248@EnderUNIX.org> <20080103192245.GB90170@keira.kiwi-computer.com> <363446479.20080103213223@EnderUNIX.org> <477D3977.3030608@u.washington.edu> In-Reply-To: <477D3977.3030608@u.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.4.1.325704, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.1.3.113120 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: freebsd-hackers@freebsd.org, "Rick C. Petty" Subject: Re: select 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: Thu, 03 Jan 2008 19:45:18 -0000 Garrett Cooper wrote: > Metin KAYA wrote: >> Yes Rick, I'm asking this "indefinitely" issue. Is there anything >> that handle this NULL situation a signal, or etc.? How does Linux or >> FreeBSD behave? >> >> >>> On Thu, Jan 03, 2008 at 08:52:48PM +0200, Metin KAYA wrote: >>> >>>> How select(2) will behave if I give the "utimeout" parameter as >>>> NULL? >>>> >> >> >>> According to the man page: >>> >> >> >>> If timeout is not a null pointer, it specifies the maximum >>> interval to >>> wait for the selection to complete. System activity can >>> lengthen the >>> interval by an indeterminate amount. >>> >> >> >>> If timeout is a null pointer, the select blocks indefinitely. >>> >> >> >>> To effect a poll, the timeout argument should not be a null >>> pointer, but >>> it should point to a zero-valued timeval structure. >>> >> >> >> >>> -- Rick C. Petty >>> >> >> >> -- Metin KAYA EnderUNIX >> Software Developer Endersys Software Engineer >> http://www.EnderUNIX.org/metin http://www.Endersys.com/ >> > Nevermind -- yes, block indefinitely, which implies that the program > won't proceed until it receives an umasked signal and exits or a file > descriptor becomes available in the 'infinite' time frame. > > That would essentially be the same as listen or send though with > blocking sockets, correct? > > -Garrett Well, the waiting part at least, not the sending and receiving part of send and listen, respectively.. -Garrett