summaryrefslogtreecommitdiff
path: root/fc-cache
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2004-12-05 06:19:46 +0000
committerKeith Packard <keithp@keithp.com>2004-12-05 06:19:46 +0000
commit54560b013ff89f4d47b4b94f6ea9d1b2e91e20fd (patch)
tree64744d7261a91eb3f6921a250d5404a28c8e3b9c /fc-cache
parentc5a0b541df8be0b66f4ecf531570242693aac930 (diff)
downloadfontconfig-54560b013ff89f4d47b4b94f6ea9d1b2e91e20fd.tar.gz
Sleep for two seconds before exiting to make sure timestamps for future
changes have distinct mod times in the file system. Bug #1982. Add Punjabi orthography. Bug #1671. reviewed by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'fc-cache')
-rw-r--r--fc-cache/fc-cache.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
index ee7c0cb..41609a1 100644
--- a/fc-cache/fc-cache.c
+++ b/fc-cache/fc-cache.c
@@ -289,6 +289,14 @@ main (int argc, char **argv)
else
list = FcConfigGetConfigDirs (config);
ret = scanDirs (list, config, argv[0], force, verbose);
+ /*
+ * Now we need to sleep a second (or two, to be extra sure), to make
+ * sure that timestamps for changes after this run of fc-cache are later
+ * then any timestamps we wrote. We don't use gettimeofday() because
+ * sleep(3) can't be interrupted by a signal here -- this isn't in the
+ * library, and there aren't any signals flying around here.
+ */
+ sleep (2);
if (verbose)
printf ("%s: %s\n", argv[0], ret ? "failed" : "succeeded");
return ret;