Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2005 15:50:49 GMT
From:      Matthew Soffen <sirgeek-freebsd@mrsucko.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/78538: times(2) not functioning per the Posix spec
Message-ID:  <200503071550.j27FoneK070927@www.freebsd.org>
Resent-Message-ID: <200503071600.j27G062W076905@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         78538
>Category:       misc
>Synopsis:       times(2) not functioning per the Posix spec
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 07 16:00:06 GMT 2005
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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