Skip to content

concore stop reports success on Windows even when taskkill fails #280

@avinxshKD

Description

@avinxshKD

In concore_cli/commands/stop.py, the Windows kill path uses check=False and never looks at the return code:

subprocess.run(['taskkill', '/F', '/PID', str(pid)], 
             capture_output=True, 
             check=False)                    # never raises
console.print(f"  ✓ Stopped {name}")         # always prints success
killed_count += 1                            # always counts as killed

On POSIX, a failed terminate() raises TimeoutExpired which gets caught and escalated to kill(). There's actual feedback.

On Windows, if taskkill fails (Access Denied, PID not found, protected process), execution falls through silently and the user sees "Successfully stopped all N process(es)" when nothing was actually stopped.

The fix is straightforward: check result.returncode != 0 and raise or log accordingly, thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions