pidfile icon indicating copy to clipboard operation
pidfile copied to clipboard

remove_pidfile is not atomic

Open pho-enix opened this issue 8 years ago • 1 comments

def remove_pidfile File.unlink(self.pidpath) if self.pidfile_exists? end

No such file or directory @ unlink_internal - /tmp/a.pid

Looks like this is a race, and the pidfile disappears right after the exists has been runt.

I think either the check and delete should be flocked or the delete should not fail if the file is not there.

pho-enix avatar Mar 02 '17 12:03 pho-enix

Thanks, Sebastian, but I haven't worked on this for years.

Feel free to fork it and make it work correctly.

samullen avatar Mar 02 '17 18:03 samullen