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