Optional mandatory locking
Optional mandatory locking
Posted Dec 10, 2015 13:27 UTC (Thu) by cuboci (subscriber, #9641)In reply to: Optional mandatory locking by philipstorry
Parent article: Optional mandatory locking
Posted Dec 10, 2015 15:59 UTC (Thu)
by alankila (guest, #47141)
[Link] (4 responses)
Posted Dec 10, 2015 19:55 UTC (Thu)
by cuboci (subscriber, #9641)
[Link] (3 responses)
Posted Dec 10, 2015 20:19 UTC (Thu)
by iabervon (subscriber, #722)
[Link]
Posted Dec 10, 2015 22:42 UTC (Thu)
by rotty (guest, #14630)
[Link]
Posted Dec 12, 2015 11:24 UTC (Sat)
by alankila (guest, #47141)
[Link]
Posted Dec 13, 2015 2:55 UTC (Sun)
by giraffedata (guest, #1954)
[Link] (1 responses)
Posted Dec 14, 2015 11:55 UTC (Mon)
by cuboci (subscriber, #9641)
[Link]
Optional mandatory locking
Optional mandatory locking
Optional mandatory locking
You could also use inotify, for example by incron to generate an event based on a file being open for writing being closed. There might be gotchas, but in principle, it should work (I've used it for auto-converting files uploaded via SMB).
Optional mandatory locking
Optional mandatory locking
It's worth noting that even if there were some file locking function that could let you block until the file isn't open for write, relying on that is still a hack in your situation, since there's no reason the program that generates the file, over which you have no control, couldn't open and close the file multiple times in the process.
Optional mandatory locking
Optional mandatory locking
