The attached patch fixes this bug for me. The patch moves the write_header() call in the inotify case to dump_remainder() where write_header() is called only if some file content is going to be output. I am not sure if this is the best approach. Another approach would be to change the inotify event handling so that all queued events are read at once and duplicates are eliminated before acting on them. Now it reads and acts on them one. -- Janne Snabb snabb@epipe.com