>You can still use "TZ=localtime" and make a "localtime" link >under the zoneinfo dir, but I agree that reading "localtime" >by default would be nice to have for those people who would >like to change the timezone dynamically.
It would be nice if "localtime" pointed to a fixed location and that that fixed location (e.g., /var/init/localtime) and make that function point to somewhere in /usr/share/lib/zoneinfo so that /usr remain mostly read-only. >>>> how is the semaphore checked and why is a mmap file in, say, >>>> /var/run not good for this purpose? >>> If the file can be truncated, it could potentially send SIGSEGV to >>> all active processes that calls ctime(3C). >> >> By root, right? Root can also truncate /lib/libc.so.1 so that doesn't fly. > >Yes. But libc.so.1 would be an extreme example. We thought >that such file/memory page needs to be protected in certain >degree to avoid catastrophic result. If that's a regular file >someone(has root privilege) may carelessly truncate it or unlink >and re-create it. We just wanted to minimize those risks. If >we shouldn't worry about those, I'll revise the spec to use >a regular file. I wouldn't see how that could happen other then, say, truncating /bin/cat. You could measure how expensive mincore() is (it's seems about 0.5-1.0us per call which is possibly a bit too much for each time call) but I think it is not needed. Of course, if other folks think that the original proposal is a proper "heavy weight" mechanism, please let them speak up. Casper