|
|
|
|
|
by JdeBP
3531 days ago
|
|
It's because IN_MODIFY covers both writing and truncation, so the code path for such an event has to handle both anyway. Ironically, given that you mention M. Cantrill, GNU tail does not really handle truncation properly, and gives up for almost the very case that M. Cantrill did: when the truncation doesn't decrease the size, or is very closely followed by a write that ends up not decreasing the size. Of course, truncation is not the best way to organize writing log files in the first place. daemontools family style log management (in cyclog, multilog, et al.) starts a fresh file whenever there is a rotation, so these problems of truncation never arise. |
|