Closed kaptajnen closed 5 years ago
WoW thats bad. We really need to catch that in our tests. Do you think you could create a PR for a test for this ?
(Otherwise I will try to make one as soon as I can)
I created a PR for a test. It's not very elegant but I couldn't figure out a better way since it needs to spawn a separate interpreter so that the atexit handler is run before the first instance finishes.
Could you please test with ce9a6e11438fb168d94c522a44f86cdd047271f4 ?
I can no longer reproduce the issue, looks like that fixed it. Thanks!
Awesome !
2.2.5 is released on https://pypi.org/project/pid/ :-)
Since version 2.2.4 this library is broken. If you run the same script twice, you get the pid.PidFileAlreadyLockedError: [Errno 35] Resource temporarily unavailable error, however the pid file is also deleted and if you run the script again it will succeed even though the first instance is still running.
Below is a sample script. Run it in one terminal, then run it again twice in a separate terminal to observe the incorrect behavior.