WLBF / single-instance

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

Use an abstract namespace UDS on Linux #7

Closed woodruffw closed 3 years ago

woodruffw commented 3 years ago

Here's my attempt at #6.

The implementation carries an Option<RawFd> around with it, which corresponds to the underlying socket (if successfully acquired). I've gone ahead and implemented Drop as well, to make its semantics consistent with the other SingleInstance implementations (otherwise it would live for the entire process lifecycle, regardless of whether the "owning" object was dropped).

Let me know what you think.

woodruffw commented 3 years ago

(CI failure looks unrelated; tests pass for me locally.)