Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/shadowsocks/shadowsocks
/ freopen
Function
freopen
shadowsocks/daemon.py:85–90 ·
view source on GitHub ↗
(f, mode, stream)
Source
from the content-addressed store, hash-verified
83
84
85
def
freopen(f, mode, stream):
86
oldf = open(f, mode)
87
oldfd = oldf.fileno()
88
newfd = stream.fileno()
89
os.close(newfd)
90
os.dup2(oldfd, newfd)
91
92
93
def
daemon_start(pid_file, log_file):
Callers
1
daemon_start
Function · 0.85
Calls
1
close
Method · 0.45
Tested by
no test coverage detected