in reply to Re: Race condition in Linux::Inotify2 between dir and new file?
in thread Race condition in Linux::Inotify2 between dir and new file?
what if in that second those seconds that you're sleeping waiting for the size of the file to grow, some other files are created in the directory watched ?
will Iotify2 call process_drop_file for those also ?
maybe starting 2 threads , one which puts them in a queue and the other which reads them from a queue would be more appropriate to not skip(unintentionally) any of them