2018-11-01 00:49:18 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import json
|
|
|
|
import os
|
2018-11-04 13:48:34 +00:00
|
|
|
import subprocess
|
2018-11-01 00:49:18 +00:00
|
|
|
import sys
|
|
|
|
|
|
|
|
os.environ['ORIGINAL_ARGV'] = json.dumps(sys.argv)
|
|
|
|
os.environ['THIS_IS_STUB_DOAS'] = '1'
|
2018-11-04 13:48:34 +00:00
|
|
|
|
|
|
|
# This must be a child process and not exec() since Mitogen replaces its stderr
|
|
|
|
# descriptor, causing the last user of the slave PTY to close it, resulting in
|
|
|
|
# the master side indicating EIO.
|
|
|
|
subprocess.check_call(sys.argv[sys.argv.index('--') + 1:])
|