From dannyman@arh0300.urh.uiuc.edu  Sun Apr  5 00:12:26 1998
Received: from arh0300.urh.uiuc.edu (arh0300.urh.uiuc.edu [130.126.72.10])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA14134;
          Sun, 5 Apr 1998 00:12:24 -0800 (PST)
          (envelope-from dannyman@arh0300.urh.uiuc.edu)
Received: (from dannyman@localhost)
	by arh0300.urh.uiuc.edu (8.8.8/8.8.5) id IAA11235;
	Sun, 5 Apr 1998 08:12:20 -0500 (CDT)
Message-Id: <199804051312.IAA11235@arh0300.urh.uiuc.edu>
Date: Sun, 5 Apr 1998 08:12:20 -0500 (CDT)
From: dannyman <dannyman@arh0300.urh.uiuc.edu>
Reply-To: dannyman@arh0300.urh.uiuc.edu
To: FreeBSD-gnats-submit@freebsd.org
Cc: dannyman@arh0300.urh.uiuc.edu, freebsd-current@freebsd.org
Subject: usleep is hosed, timezone problems in current
X-Send-Pr-Version: 3.2

>Number:         6218
>Category:       i386
>Synopsis:       problems with usleep and adjkerntz
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr  5 00:20:00 PST 1998
>Closed-Date:    Sun Apr 5 04:53:50 PDT 1998
>Last-Modified:  Tue Nov 27 19:25:26 PST 2001
>Originator:     dannyman
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

FreeBSD arh0300.urh.uiuc.edu 3.0-CURRENT FreeBSD 3.0-CURRENT #8: Sun Apr  5 01:22:12 CST 1998     dannyman@arh0300.urh.uiuc.edu:/newhome/src/sys/compile/STUMPY  i386

>Description:

just did a make buildowld ; make installworld on CVSup run at 0430h
saturday morning localtime. :)

usleep is not returning proper return codes.  even when it works just fine,
it returns -1 consistently, and appears to set errno at whimsy (i've gotten
35 and 2) ...

also, I appear to be on what I guess to be UTC ... i tried to reset my tz
with tzsetup ... no avail ... I ran ntpdate and things were corrected,
after my X display went blank for awhile.  awhile later the screen went
blank for a few seconds again and I'm back now ... well, should be 0309h
CDT (just should have shifted from CST 0209h ...) 5 April ... date says;
Sun Apr  5 08:10:13 CDT 1998

UTC afaik :)

>How-To-Repeat:

#include <unistd.h>
#include <errno.h>

main() {
	extern int errno;

	printf("usleep return: %d\n", usleep(1));
	printf("errno: %d\n", errno);
	}

I had a program that was running while(!usleep(val)) and is currently
kludged to while(usleep(val)) just fine ...
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Sun Apr 5 04:53:50 PDT 1998 
State-Changed-Why:  
should be fixed. 
>Unformatted:
