Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Jul 1997 21:39:44 +0800
From:      Peter Wemm <peter@spinner.dialix.com.au>
To:        =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: sleep (was Re: Application os version compatibility?) 
Message-ID:  <199707061339.VAA23239@spinner.dialix.com.au>
In-Reply-To: Your message of "Sun, 06 Jul 1997 16:56:48 %2B0400." <Pine.BSF.3.96.970706165328.498A-100000@nagual.pp.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
=?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
> <ache@null.net>
> http://www.nagual.pp.ru/~ache/

Cheers,
-Peter




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707061339.VAA23239>