Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 May 1997 10:39:14 +0400 (MSD)
From:      =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        peter@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-lib@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/gen sleep.c
Message-ID:  <Pine.BSF.3.96.970518102602.566C-100000@nagual.pp.ru>
In-Reply-To: <199705180129.LAA17474@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 18 May 1997, Bruce Evans wrote:

> One difference is that non-defaulted SIGALRMs now kill the process
> instead of terminating the sleep.  This breaks sleep(1).  POSIX.1 may
> allow either behaviour (the behaviour is mostly unspecified so that BAD
> historiclal implementations using alarm() are standard).  In particular,
> if SIGALRM is not generated be a previous call to alarm() and SIGALRM is
> not being ignored or blocked, then it is explicitly unspecified whether
> the signal has any effect other than causing sleep() to return.  The case
> of SIGALRMs generated by alarm()s seems to be implicitly unspecified!

Yes. It is easy way to see this bug:
sleep 1000 &
kill -ALRM %1

old variant says:
[1] Terminated

New one says:
[1] Alarm clock

(don't forget to re-buid sleep(1), of course)

But it is not the only difference. As I say, old sleep restarted again
after signal != SIGALRM (f.e. SIGCHLD), but new sleep terminates! I
suspect this thing break Apache. 

-- 
Andrey A. Chernov
<ache@null.net>
http://www.nagual.pp.ru/~ache/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970518102602.566C-100000>