Browse Source

add setsid

auth
clowwindy 10 years ago
parent
commit
dae2624b30
  1. 3
      shadowsocks/daemon.py

3
shadowsocks/daemon.py

@ -126,6 +126,9 @@ def daemon_start(pid_file, log_file):
print('started') print('started')
os.kill(ppid, signal.SIGTERM) os.kill(ppid, signal.SIGTERM)
os.setsid()
signal.signal(signal.SIG_IGN, signal.SIGHUP)
sys.stdin.close() sys.stdin.close()
try: try:
freopen(log_file, 'a', sys.stdout) freopen(log_file, 'a', sys.stdout)

Loading…
Cancel
Save