News for hackers. Stuff that matters.
Re:Setenv Is Not Thread Safe and C Doesn't Want to Fix It by account42 on Monday November 20, 2023 @10:13AM (#38349339)
> Many POSIX systems rely on `/etc/localtime` to define the system-wide time zone, and every `localtime` call has to check if the file has been changed or not because there is no way to subscribe to the system-wide time zone change event.

But you can subscribe to file change events so why not do that?

Re:Setenv Is Not Thread Safe and C Doesn't Want to Fix It by lifthrasiir on Monday November 20, 2023 @11:27AM (#38350077)
I did seriously consider inotify back in time, but in order to take advantage of inotify I had to parse all binary TZif files (because otherwise I still had to call `localtime` that would `stat` every time anyway). It was so cumbersome, that was only halfway finished when I stepped down as a maintainer. Hence my surprise when I learned that someone actually did implement all of them.