{"action":"created","issue":{"url":"https://api.github.com/repos/arvenil/ninja-mutex/issues/28","repository_url":"https://api.github.com/repos/arvenil/ninja-mutex","labels_url":"https://api.github.com/repos/arvenil/ninja-mutex/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/arvenil/ninja-mutex/issues/28/comments","events_url":"https://api.github.com/repos/arvenil/ninja-mutex/issues/28/events","html_url":"https://github.com/arvenil/ninja-mutex/issues/28","id":134712033,"number":28,"title":"FlockLock failed to remove temporary lock file.","user":{"login":"laurent-clouet","id":9846442,"avatar_url":"https://avatars.githubusercontent.com/u/9846442?v=3","gravatar_id":"","url":"https://api.github.com/users/laurent-clouet","html_url":"https://github.com/laurent-clouet","followers_url":"https://api.github.com/users/laurent-clouet/followers","following_url":"https://api.github.com/users/laurent-clouet/following{/other_user}","gists_url":"https://api.github.com/users/laurent-clouet/gists{/gist_id}","starred_url":"https://api.github.com/users/laurent-clouet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurent-clouet/subscriptions","organizations_url":"https://api.github.com/users/laurent-clouet/orgs","repos_url":"https://api.github.com/users/laurent-clouet/repos","events_url":"https://api.github.com/users/laurent-clouet/events{/privacy}","received_events_url":"https://api.github.com/users/laurent-clouet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-18T22:14:51Z","updated_at":"2016-02-20T19:20:50Z","closed_at":null,"body":"Hello,\r\n\r\nI'm using FlockLock and after usage i have a lot of .lock file in the working directory.\r\nI tried to look for a cleanup function but i didn't found one, I'm guessing the .lock files should be automatically removed after usage.\r\nI'm using lock like this:\r\n>$key = 'some_key';\r\n$value = 'some_value';\r\n$lock = new NinjaMutex\\Lock\\FlockLock(\"/tmp\");\r\n$mutex = new NinjaMutex\\Mutex($key, $lock);\r\nif ($mutex->acquireLock(1000)) {\r\n    $mutex->releaseLock();\r\n    unset($mutex);\r\n}\r\n\r\nAfter running the code i have \"/tmp/some_key.lock\" file remaining.\r\nDid I do something wrong or is it a bug ?\r\n\r\nI tried on 5.6.17-0+deb8u1 (Debian), 5.6.11-1ubuntu3.1 (Ubuntu) i have the same behaviour.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/arvenil/ninja-mutex/issues/comments/186668487","html_url":"https://github.com/arvenil/ninja-mutex/issues/28#issuecomment-186668487","issue_url":"https://api.github.com/repos/arvenil/ninja-mutex/issues/28","id":186668487,"user":{"login":"arvenil","id":450355,"avatar_url":"https://avatars.githubusercontent.com/u/450355?v=3","gravatar_id":"","url":"https://api.github.com/users/arvenil","html_url":"https://github.com/arvenil","followers_url":"https://api.github.com/users/arvenil/followers","following_url":"https://api.github.com/users/arvenil/following{/other_user}","gists_url":"https://api.github.com/users/arvenil/gists{/gist_id}","starred_url":"https://api.github.com/users/arvenil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvenil/subscriptions","organizations_url":"https://api.github.com/users/arvenil/orgs","repos_url":"https://api.github.com/users/arvenil/repos","events_url":"https://api.github.com/users/arvenil/events{/privacy}","received_events_url":"https://api.github.com/users/arvenil/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T19:20:50Z","updated_at":"2016-02-20T19:20:50Z","body":"In other words, believe me I understand the point that this library should do some cleanups and I totally agree with that:) Sadly it's not as easy as it may seams so. So if someone will provide a way without introducing race conditions I would be more than happy to merge it."}}