mirror of
https://github.com/markqvist/rnsh.git
synced 2024-10-01 01:15:37 -04:00
ebdcb50265
Connects pipes on the listener child process the same way they are connected on the initiator--any combination of stdin, stdout, and stderr could be connected to a pipe. Any one of those not connected to a pipe will be connected to a pty.
7 lines
187 B
Python
7 lines
187 B
Python
import os
|
|
import sys
|
|
|
|
for stream in [sys.stdin, sys.stdout, sys.stderr]:
|
|
print(f"{stream.name:8s} " + ("tty" if os.isatty(stream.fileno()) else "not tty"))
|
|
|
|
print(f"args: {sys.argv}") |