GNU bug report logs - #68808
subsecond mtime discovery code insufficient

Previous Next

Package: automake;

Reported by: Karl Berry <karl <at> freefriends.org>

Date: Mon, 29 Jan 2024 23:02:01 UTC

Severity: normal

Full log


Message #11 received at 68808 <at> debbugs.gnu.org (full text, mbox):

From: Erik A Johnson <JohnsonE <at> usc.edu>
To: Karl Berry <karl <at> freefriends.org>
Cc: "68808 <at> debbugs.gnu.org" <68808 <at> debbugs.gnu.org>
Subject: Re: subsecond mtime discovery code insufficient
Date: Tue, 30 Jan 2024 12:08:16 +0000
	I'm guessing the Mac (and its sleep command?) do support subsecond mtimes in reality.

echo a > 1 && echo b > 2 && echo c > 3 && ls -t [123]
consistently gives me the correct order (3 2 1).
The macOS version of stat has a mtime_nsec field that is fully populated and the file modification times differ by about a half of a millisecond.

	But, looking at that code, I belatedly see that shell arrays are being
	used. At least I think so. It wouldn't surprise me if the mac /bin/sh
	doesn't support arrays. But that should result in assuming subsecond
	mtimes are not supported when they are, instead of the reverse. Anyway,
	I don't think we can assume arrays, so I'll have to think about that.

On macOS, /bin/sh is actually /bin/bash executing in POSIX mode.  I _think_ it has arrays but I could check if you have some code you want me to run.





This bug report was last modified 1 year and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.