Browse Source
Some Linux OSs impose a length limit on the path a Unix socket may have. This is not an issue in `lightningd` since we `chdir()` into that directory before opening the socket, however in pyln this became a problem for some tests, since we use absolute paths in the testing framework. It's also a rather strange quirk to expose to users. This patch introduces a `UnixSocket` abstraction that attempts to work around these limitations by aliasing the directory containing the socket into `/proc/self/fd` and then connecting using that alias. It was inspired by Open vSwitch code here https://github.com/openvswitch/ovs/blob/master/python/ovs/socket_util.py Signed-off-by: Christian Decker <@cdecker>travis-debug
Christian Decker
5 years ago
2 changed files with 90 additions and 6 deletions
Loading…
Reference in new issue