On Tue, Feb 28, 2023 at 01:47:03AM +0100, Andrew Zaborowski wrote:
> Use a lock file to be able to log an error when the UDS socket's path is
> in use by another instance, avoid silently unlink()ing it.
>
> There's no way for multiple instances (e.g. in a multi-domain setup) to
> bind() to the same address, there's nothing like SO_REUSEADDR for unix
> sockets. Just unlinking the socket makes for a behaviour that's
> initially confusing to the user, and creates a race condition where
> one instane's bind() call can happen between another instane's unlink()
> and bind() causing the latter to fail. Resort to logging an error when
> uds_{,ro_}address is in use.
I think this adds unneeded complexity to the code base for little
benefit. The issues you describe can be avoided by writing correct
start up scripts.
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel