diff --git a/a.py b/a.py deleted file mode 100644 index 004354be..00000000 --- a/a.py +++ /dev/null @@ -1,16 +0,0 @@ -import os, socket - -def CreateChild(*args): - ''' - Create a child process whos stdin/stdout is connected to a socketpair. - Returns: - fd - ''' - sock1, sock2 = socket.socketpair() - if os.fork(): - for pair in ((0, sock1), (1, sock2)): - os.dup2(sock2.fileno(), pair[0]) - os.close(pair[1].fileno()) - os.execvp(args[0], args) - raise SystemExit - return sock1