From 2257b488b939ae27d8aee29e6f4d75913d58d944 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 5 Apr 1998 07:31:44 +0000 Subject: [PATCH] tsleep() returns EWOULDBLOCK if the timeout expired. Don't return this to usermode, otherwise sleep(3) fails, cron doesn't work, etc etc etc. --- sys/kern/kern_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index c6407f691255..abf1dfac378c 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 - * $Id: kern_time.c,v 1.45 1998/04/04 13:25:25 phk Exp $ + * $Id: kern_time.c,v 1.46 1998/04/04 18:46:13 phk Exp $ */ #include @@ -235,7 +235,7 @@ nanosleep1(p, rqt, rmt) *rmt = ts; timespecsub(rmt, &ts2); } - return(error); + return (error == EWOULDBLOCK ? 0 : error); } #ifndef _SYS_SYSPROTO_H_