Closed woodruffw closed 3 years ago
The advantages you listed seems very attactive. I think use abstract Unix domain socket instead of file would be a great idea.
Cool, I’ll give it a try this week.
Sent from mobile. Please excuse my brevity.
On Feb 8, 2021, at 3:25 AM, Liu BoFan notifications@github.com wrote:
The advantages you listed seems very attactive. I think use abstract Unix domain socket instead of file would be a great idea.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hey there! I was looking into writing my own crate for process singletons, and I ran into this one. Nice work!
I'm just dropping in to offer a suggestion for improving this crate, at least on Linux: instead of acquiring a lock on a file, you could instead create a Unix domain socket in the "abstract" namespace. This has a few advantages:
Drop
(which won't fire on program interrupts or aborts)The nix crate has support for creating domain sockets in the abstract namespace. I'd be happy to work on this feature, if you're interested.