Created
December 15, 2013 10:48
-
-
Save snyh/7971483 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
s = socket.socket(socket.AF_UNIX) | |
addr = "\0org.snyh.test" | |
s.bind(addr) | |
while(True): | |
pass | |
# use netstat -anp | grep snyh | |
# to verify it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The firs character of address must be '\0'.
Thanks python doesn't use '\0' for string terminal.