From nobody@FreeBSD.org  Mon Mar  7 15:50:50 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0407E16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 Mar 2005 15:50:50 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D4F2543D5C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 Mar 2005 15:50:49 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j27FonqD070928
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 7 Mar 2005 15:50:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j27FoneK070927;
	Mon, 7 Mar 2005 15:50:49 GMT
	(envelope-from nobody)
Message-Id: <200503071550.j27FoneK070927@www.freebsd.org>
Date: Mon, 7 Mar 2005 15:50:49 GMT
From: Matthew Soffen <sirgeek-freebsd@mrsucko.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: times(2) not functioning per the Posix spec
X-Send-Pr-Version: www-2.3

>Number:         78538
>Category:       misc
>Synopsis:       times(2) not functioning per the Posix spec
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 07 16:00:06 GMT 2005
>Closed-Date:    Mon Mar 07 16:52:26 GMT 2005
>Last-Modified:  Mon Mar 07 16:52:26 GMT 2005
>Originator:     Matthew Soffen
>Release:        FreeBSD 4.7
>Organization:
None
>Environment:
FreeBSD truffle0.soffen.com 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct  9 15:08:34 GMT 2002     root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
This is a finding from the Linux-Ha project and Robert Watson agrees that it does appear to be a bug in the behavior.

According to the posix spec, the times (2) structure is supposed be unchangable from boot to boot.  It  is affected by any clock changes and per the spec ( http://www.opengroup.org/onlinepubs/009695399/functions/times.html ) it shouldn't be.
>How-To-Repeat:
Have something using  a times(2) structure to generate unique ID ( for the current run), cange the system time and you would be able to create duplicate time structurs.


>Fix:
Make times(2) work like the posix spec.  It shouldn't be based on Epoch being 0, it should be based on "startup" time being the 0 time.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Mar 7 16:51:58 GMT 2005 
State-Changed-Why:  
Duplicate of kern/78537. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78538 
>Unformatted:
