Pastebin
Paste #467: dup2
< previous paste - next paste>
Pasted by Morten
p = Popen([scriptfile], shell=True, stdin=PIPE, stdout=PIPE, close_fds=True)
(child_stdout, child_stdin) = (p.stdout, p.stdin)
print "Executing os.dup2"
os.dup2(child_stdin.fileno(), 0)
os.dup2(child_stdout.fileno(), 1)
New Paste
Go to most recent paste.