4

Use an abstract namespace UDS on Linux by woodruffw · Pull Request #7 · WLBF/sin...

 2 years ago
source link: https://github.com/WLBF/single-instance/pull/7
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Contributor

woodruffw commented on Feb 9, 2021

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK