From owner-freebsd-hackers Sun Jul 6 06:41:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA22824 for hackers-outgoing; Sun, 6 Jul 1997 06:41:01 -0700 (PDT) Received: from spinner.dialix.com.au (spinner.dialix.com.au [192.203.228.67]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA22814 for ; Sun, 6 Jul 1997 06:40:35 -0700 (PDT) Received: from spinner.dialix.com.au (localhost.dialix.com.au [127.0.0.1]) by spinner.dialix.com.au with ESMTP id VAA23239; Sun, 6 Jul 1997 21:39:45 +0800 (WST) Message-Id: <199707061339.VAA23239@spinner.dialix.com.au> X-Mailer: exmh version 2.0delta 6/3/97 To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= cc: freebsd-hackers@FreeBSD.ORG Subject: Re: sleep (was Re: Application os version compatibility?) In-reply-to: Your message of "Sun, 06 Jul 1997 16:56:48 +0400." Date: Sun, 06 Jul 1997 21:39:44 +0800 From: Peter Wemm Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= wrote: > On 6 Jul 1997, Peter Wemm wrote: > > > Take programs using sleep() in 3.0. If you statically link a program under > > 3.0, sleep() makes a call to either the nanosleep() or signanosleep() sysca ll > > (depending on the age of libc). If you try and run this program under 2.2 > > or 2.1, it'll get a SIGSYS and die when it tries to sleep. /bin/sleep is > > the primary offender. On the other hand, a dynamically linked /bin/sleep > > works on both systems because both branches provide their own implementatio n > > of sleep(3). > > Peter, why not remove special handling of ignored ALARMs in sleep() code? > It is not compatible with world sleep() implementations and gives no > advantages, but can cause potential incompatibility in future. I remember > you agree with this statement too. I'm not quite sure I follow you there.. I once talked about how using plain nanosleep() as a replacement for sleep() is incompatable with some things that depeneded on the SIGALRM eating semantics, and that one way around it was to build make a merged sigprocmask/nanosleep syscall which is basically "wait for specific signals or timeout, whichever comes first" - this is what is in the tree at present. I also talked about using another syscall to directly implement the sleep(3)/usleep(3) semantics, perhaps called nsleep(), which has the same args as nanosleep() (ie: requested and returned times). What were you thinking of? > -- > Andrey A. Chernov > > http://www.nagual.pp.ru/~ache/ Cheers, -Peter