From owner-freebsd-current Thu Dec 10 22:59:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA25654 for freebsd-current-outgoing; Thu, 10 Dec 1998 22:59:25 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA25647 for ; Thu, 10 Dec 1998 22:59:21 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id WAA35073; Thu, 10 Dec 1998 22:59:07 -0800 (PST) (envelope-from dillon) Date: Thu, 10 Dec 1998 22:59:07 -0800 (PST) From: Matthew Dillon Message-Id: <199812110659.WAA35073@apollo.backplane.com> To: Archie Cobbs Cc: jwd@unx.sas.com, freebsd-current@FreeBSD.ORG Subject: Re: inetd: realloc/free bug References: <199812110654.WAA25455@bubba.whistle.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> :> If you put a time limit on select(), it doesn't matter if there is a :> race condition there. How does select() cause a signal to be missed ? : :Well, sure.. :-) but then you don't service signals in real time :and spend extra cycles timing out all the time. You do serve signals in real time... the signals are *unmasked* during the select() :-) ... the race condition is that the unmasked signal may cause the descriptor set to be changed just prior to the select() call, causing select() to wait forever. The timeout on the select() handles the race condition without effecting the realtime delivery of signals. -Matt :By the way, from man select(2): : : BUGS : select() should probably return the time remaining from the original : timeout, if any, by modifying the time value in place. This may be im- : plemented in future versions of the system. Thus, it is unwise to assume : that the timeout value will be unmodified by the select() call. : :Is this ever going to be implemented? I think this warning's been :around for at least 10 years now.. : :-Archie : :___________________________________________________________________________ :Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-current" in the body of the message : Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet Communications & God knows what else. (Please include original email in any response) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message