[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yaccvpath.test
From: |
Derek R. Price |
Subject: |
Re: yaccvpath.test |
Date: |
Fri, 02 Mar 2001 08:50:37 -0500 |
Alexandre Oliva wrote:
> On Feb 28, 2001, "Derek R. Price" <address@hidden> wrote:
>
> > CVS uses a single second sleep to guarentee timestamps change cross-platform
>
> IIRC, FAT filesystems can only store even second numbers. So, in
> order to be 100% safe, you'd need to sleep for 2 seconds, but a
> 1-second sleep should be ok on at least 50% of the cases.
I don't think so. The CVS code does the following, regardless of the platform:
while (last_register_time && time ((time_t *) NULL) == last_register_time)
{
* sleep 20ms *
}
Where last_register_time is the last time a file was written (recorded just
after
writing).
In other words, this code simply waits until the next second. I don't usually
work on the Windows specific code myself, but everything here except the sleep
function is common code, and unless the clock and not just the file system has a
2 second granularity, then a race condition would have been created. I haven't
seen the bug reports and I know for a fact that the Windows sleep function was
just recently rewritten to allow millisecond granularity, so the rest is
doubtful.
Derek
--
Derek Price CVS Solutions Architect ( http://CVSHome.org )
mailto:address@hidden OpenAvenue ( http://OpenAvenue.com )
--
I will not celebrate meaningless milestones.
I will not celebrate meaningless milestones.
I will not celebrate meaningless milestones...
- Bart Simpson on chalkboard, _The Simpsons_