From owner-freebsd-hackers Wed Dec 29 16:39:13 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id 6288014F67 for ; Wed, 29 Dec 1999 16:39:08 -0800 (PST) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (doconnor@cain [203.38.152.97]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id LAA00627; Thu, 30 Dec 1999 11:08:58 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 30 Dec 1999 11:08:57 +1030 (CST) From: "Daniel O'Connor" To: Ken Bolingbroke Subject: Re: Sorry, but another thread problem! Cc: freebsd-hackers@FreeBSD.ORG, Steffen Merkel Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 29-Dec-99 Ken Bolingbroke wrote: > From my own experience, altho I'm not that skilled a programmer, > sleep() > is not thread-safe. I believe sleep() sets a global SIGALARM, which > is > reset by every thread that calls it, and thus only the last one ever > returns. Replacing sleep() with nanosleep() or something else that > is > thread-safe should solve that problem. Stupid question time.. If that is so why doesn't sleep just use nanosleep? :) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message