Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontends/tuiapp_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,8 @@ def _sweep_stale_task_dirs() -> None:

def _clipboard_run(cmd: list[str], input: bytes | None = None, timeout: float = 3.0) -> bytes | None:
try:
r = subprocess.run(cmd, input=input, capture_output=True, timeout=timeout)
stdin = subprocess.DEVNULL if input is None else None
r = subprocess.run(cmd, input=input, stdin=stdin, capture_output=True, timeout=timeout)
return r.stdout if r.returncode == 0 else None
except (FileNotFoundError, subprocess.TimeoutExpired, OSError):
return None
Expand Down Expand Up @@ -5913,7 +5914,7 @@ def _run_shell(self, cmd: str) -> None:
out = ''; rc = 0
try:
r = subprocess.run(
shell_argv + [cmd], capture_output=True,
shell_argv + [cmd], stdin=subprocess.DEVNULL, capture_output=True,
timeout=30, encoding='utf-8', errors='replace',
)
out = (r.stdout or '') + (r.stderr or '')
Expand Down
3 changes: 2 additions & 1 deletion ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def stream_reader(proc, logs):

try:
process = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
cmd, stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
bufsize=0, cwd=cwd, startupinfo=startupinfo,
creationflags=0x08000000 if os.name == 'nt' else 0
)
Expand Down
2 changes: 1 addition & 1 deletion memory/checklist_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
_R = Path(__file__).resolve().parent.parent
_BBS, _MAIN = _R/"assets/agent_bbs.py", _R/"agentmain.py"
_W_RE, _M_RE = _R/"reflect/agent_team_worker.py", _R/"reflect/checklist_master.py"
_PK = {"stdout": subprocess.DEVNULL, "stderr": subprocess.DEVNULL}
_PK = {"stdin": subprocess.DEVNULL, "stdout": subprocess.DEVNULL, "stderr": subprocess.DEVNULL}
if sys.platform == "win32": _PK["creationflags"] = 0x200

class CL:
Expand Down