From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 3 19:37:41 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 A1C8C16A418 for ; Thu, 3 Jan 2008 19:37:41 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2DE13C4D5 for ; Thu, 3 Jan 2008 19:37:41 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.09) with ESMTP id m03JbRad008610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Jan 2008 11:37:28 -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 m03JbRai001037 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 3 Jan 2008 11:37:27 -0800 Message-ID: <477D3977.3030608@u.washington.edu> Date: Thu, 03 Jan 2008 11:37:27 -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> In-Reply-To: <363446479.20080103213223@EnderUNIX.org> 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.111644 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:37:41 -0000 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