vmtouch icon indicating copy to clipboard operation
vmtouch copied to clipboard

Recrawl on HUP?

Open timp87 opened this issue 8 years ago • 1 comments

Hello. What if vmtouch recrawled file paths in case of SIGHUP receiving? What do you think?

timp87 avatar Jun 08 '17 08:06 timp87

Yes, it's a good idea, thanks! It might be a bit complicated to implement though. We'd have to keep track of the mappings as we make them, then unlock and unmap them before redoing the crawl.

Usually it's enough to just kill the vmtouch process and spawn it again, but a HUP signal could have some advantages. For example, if a file hasn't changed inode/size, then we could avoid remapping/relocking it, therefore eliminating the small window where it's unlocked.

Thanks for the idea! Unfortunately I don't have the time to do this right now, but I'd consider a PR for it.

hoytech avatar Jun 08 '17 13:06 hoytech