WLBF / single-instance

A rust library for single instance application.
MIT License
34 stars 8 forks source link

Consider using an abstract Unix domain socket on Linux #6

Closed woodruffw closed 3 years ago

woodruffw commented 3 years ago

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:

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.

WLBF commented 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.

woodruffw commented 3 years ago

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.

woodruffw commented 3 years ago

7.