diff --git a/examples/capture.py b/examples/capture.py index 8e60931..174a7b3 100644 --- a/examples/capture.py +++ b/examples/capture.py @@ -24,8 +24,9 @@ p_pid, master_fd = pty.fork() if p_pid == 0: # Child. - os.execvpe(argv[0], argv, - env=dict(TERM="linux", COLUMNS="80", LINES="24")) + env = os.environ.copy() + env.update(dict(TERM="linux", COLUMNS="80", LINES="24")) + os.execvpe(argv[0], argv, env=env) with open(output_path, "wb") as handle: while True: