diff --git a/xonsh/jobs.py b/xonsh/jobs.py index 96143b2e74..2f490b1750 100644 --- a/xonsh/jobs.py +++ b/xonsh/jobs.py @@ -210,7 +210,7 @@ def _continue(job): def _kill(job): subprocess.check_output( - ["taskkill", "/F", "/T", "/PID", str(job["proc"].pid)], + ["taskkill", "/F", "/T", "/PID", str(job["obj"].pid)], stderr=subprocess.STDOUT, ) @@ -231,7 +231,7 @@ def wait_for_active_job(last_task=None, backgrounded=False, return_error=False): # Return when there are no foreground active task if active_task is None: return last_task - proc = active_task["proc"] + proc = active_task["obj"] _continue(active_task) while proc.returncode is None: try: @@ -344,7 +344,7 @@ def wait_for_active_job(last_task=None, backgrounded=False, return_error=False): # Return when there are no foreground active task if active_task is None: return last_task - proc = active_task["proc"] + proc = active_task["obj"] info = {"backgrounded": False} try: @@ -402,7 +402,7 @@ def _clear_dead_jobs(): to_remove = set() tasks = get_tasks() for tid in tasks: - proc = get_task(tid)["proc"] + proc = get_task(tid)["obj"] if proc is None or proc.poll() is not None: to_remove.add(tid) for job in to_remove: diff --git a/xonsh/procs/specs.py b/xonsh/procs/specs.py index 4a93e88e51..815481002c 100644 --- a/xonsh/procs/specs.py +++ b/xonsh/procs/specs.py @@ -956,7 +956,7 @@ def _run_command_pipeline(specs, cmds): "cmds": cmds, "pids": [i.pid for i in cp.procs], "status": "suspended" if cp.suspended else "running", - "proc": proc, + "obj": proc, "bg": background, "pipeline": cp, "pgrp": cp.term_pgid,