Skip to content

concorekill.bat written to CWD on every import, never cleaned up #279

@avinxshKD

Description

@avinxshKD

concore.py lines 18-20:

if hasattr(sys, 'getwindowsversion'):
    with open("concorekill.bat","w") as fpid:
        fpid.write("taskkill /F /PID "+str(os.getpid())+"\n")

Two problems:

  1. If two concore processes start in the same directory, the second one silently overwrites the first one's kill script. The first process becomes unkillable via its .bat file since the PID inside now belongs to process File Receiving Interface. #2.

  2. The file is never deleted on exit. Run a few workflows and you end up with stale concorekill.bat files pointing to long-dead PIDs. Harmless on their own, but confusing — a user running the leftover .bat would either kill the wrong process or get "process not found" errors.

Should either use a unique filename per process (e.g. concorekill_{pid}.bat) or register an atexit handler to clean it up Or both.

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