harlowja / fasteners

A python package that provides useful locks.
Apache License 2.0
246 stars 45 forks source link

added simple flock alternative to fcntl lock #48

Closed redramen closed 3 years ago

redramen commented 4 years ago

I tried using the default fcntl lock with a daemon process (one generated by python-daemon package) but was running into a few issues. Notably I could not write my PID to a file, nor could I read it back with that style of locking. I can do those with the BSD style flock.

psarka commented 3 years ago

Hi @redramen, thank for the suggestion, at the moment I moved it to https://github.com/harlowja/fasteners/issues/53.

It would be interesting if you could provide a bit more context, do I understand correctly, that you had no access to file system? Did you try your own code, or did you use InterProcessLock (asking, as it does not seem to write PID to a file, which you are mentioning)