Nicer syntax for running a non-default program

This commit is contained in:
Kovid Goyal
2016-10-21 08:41:11 +05:30
parent f86f28a4bd
commit c9167b51fc
2 changed files with 7 additions and 5 deletions
+1 -3
View File
@@ -7,7 +7,6 @@ import re
import sys
import termios
import struct
import shlex
import fcntl
import signal
import ctypes
@@ -59,8 +58,7 @@ def create_pty():
return create_pty.master, create_pty.slave
def fork_child(cmd, cwd, opts):
argv = shlex.split(cmd)
def fork_child(argv, cwd, opts):
master, slave = create_pty()
pid = os.fork()
if pid == 0: