Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Now obviously people these days generally know about that so hopefully don’t use predictable file names but that’s one way.

Annoying side effect: now you gotta guess which process created the darn lockfile.

A more sensible approach is to do sanity checking on the lockfile and its contents (i.e. does the contained PID match one's own binary).



> now you gotta guess which process created the darn lockfile

Or you can use “lsof” to just tell you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: