misc/78538: times(2) not functioning per the Posix spec

Matthew Soffen sirgeek-freebsd at mrsucko.org
Mon Mar 7 16:00:07 GMT 2005


>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 at 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:


More information about the freebsd-bugs mailing list