Closed ancwrd1 closed 3 years ago
Just realized that for Linux the namespace-based UDS was used, so this PR might not be relevant. You can decide.
Yeah, I implemented flock-based solution for both linux and unix in the past. For now, according #6 , I think namespace-based UDS is a proper choice.
This PR implements a common flock-based solution for POSIX platforms as advised in different articles. We use this code in our product so I thought to make a PR into upstream.
The issue with Unix domain sockets is that there could be a stale socket file left on the filesystem which will cause the bind operation to fail. This situation is difficult to resolve correctly.