mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-03-24 05:39:46 +01:00
20 lines
368 B
Python
20 lines
368 B
Python
import sys
|
|
import os
|
|
import subprocess as ssubprocess
|
|
|
|
|
|
_p = None
|
|
|
|
|
|
def start_syslog():
|
|
global _p
|
|
_p = ssubprocess.Popen(['logger',
|
|
'-p', 'daemon.notice',
|
|
'-t', 'sshuttle'], stdin=ssubprocess.PIPE)
|
|
|
|
|
|
def stderr_to_syslog():
|
|
sys.stdout.flush()
|
|
sys.stderr.flush()
|
|
os.dup2(_p.stdin.fileno(), 2)
|