Show More
@@ -764,10 +764,14 b' def bindunixsocket(sock, path):' | |||||
764 | # platforms (see sys/un.h) |
|
764 | # platforms (see sys/un.h) | |
765 | dirname, basename = os.path.split(path) |
|
765 | dirname, basename = os.path.split(path) | |
766 | bakwdfd = None |
|
766 | bakwdfd = None | |
767 | if dirname: |
|
767 | ||
768 | bakwdfd = os.open(b'.', os.O_DIRECTORY) |
|
768 | try: | |
769 |
|
|
769 | if dirname: | |
770 | sock.bind(basename) |
|
770 | bakwdfd = os.open(b'.', os.O_DIRECTORY) | |
771 | if bakwdfd: |
|
771 | os.chdir(dirname) | |
772 | os.fchdir(bakwdfd) |
|
772 | sock.bind(basename) | |
773 |
|
|
773 | if bakwdfd: | |
|
774 | os.fchdir(bakwdfd) | |||
|
775 | finally: | |||
|
776 | if bakwdfd: | |||
|
777 | os.close(bakwdfd) |
General Comments 0
You need to be logged in to leave comments.
Login now