mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-01-07 14:39:45 +01:00
c70b9937df
Just kidding. This is a squash of a whole bunch of unlabeled temporary commits that I produced over the last couple of weeks while writing a UI for MacOS while riding on airplanes and sitting in airports. So long, batch of useless commits!
15 lines
314 B
Python
15 lines
314 B
Python
import os
|
|
|
|
pid = os.fork()
|
|
if pid == 0:
|
|
# child
|
|
try:
|
|
os.setsid()
|
|
#os.execvp('sudo', ['sudo', 'SSH_ASKPASS=%s' % os.path.abspath('askpass.py'), 'ssh', 'afterlife', 'ls'])
|
|
os.execvp('ssh', ['ssh', 'afterlife', 'ls'])
|
|
finally:
|
|
os._exit(44)
|
|
else:
|
|
# parent
|
|
os.wait()
|