Skip to content
Newer
Older
100644 17 lines (12 sloc) 358 Bytes
5bf6e40 @apenwarr daemonization: make sure the firewall subproc sends to syslog too.
apenwarr authored Jan 1, 2011
1 import sys, os
2 from compat import ssubprocess
3
4
5 _p = None
6 def start_syslog():
7 global _p
8 _p = ssubprocess.Popen(['logger',
95ab6e7 @apenwarr ssyslog.py: use daemon.notice instead of daemon.info
apenwarr authored Jan 1, 2011
9 '-p', 'daemon.notice',
5bf6e40 @apenwarr daemonization: make sure the firewall subproc sends to syslog too.
apenwarr authored Jan 1, 2011
10 '-t', 'sshuttle'], stdin=ssubprocess.PIPE)
11
12
13 def stderr_to_syslog():
14 sys.stdout.flush()
15 sys.stderr.flush()
16 os.dup2(_p.stdin.fileno(), 2)
Something went wrong with that request. Please try again.