Operating systems limit the length of a path of a Unix domain socket. How can I check whether a particular path is within that limit?
Or, to put it another way, how can I check the maximum permitted length of a path of a Unix domain socket, on a Linux or Mac OS X system?
My use case here is for SSH multiplexing: if the ControlPath is too long, then SSH multiplexing won't work since it creates a unix domain sockets. I want to be able to check for a valid control path without having to actually start an ssh session and look for the error message.