Repository navigation
fix(concore): let concorekill.bat match the node's script, so stop.bat stops Python nodes on Windows - #653
Open
Siddhanthguptaa wants to merge 1 commit into
Conversation
concorekill.bat only killed PIDs whose command line contained "concore", but nodes run as `python controller.py`, so stop.bat skipped every node on Windows. Match the node's own script name instead (falling back to "concore"), and make the Windows test start a real node script that registers its own PID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #652
concorekill.batonly killed a registered PID if its command line contained "concore", but a node runs as"...\python.exe" "controller.py", sostop.batskipped every node. The script now checks for the node's own script name (basename ofsys.argv[0], e.g.controller.py), matched literally withfindstr /i /l /c:; it falls back to "concore" if there's no.pyscript name or the name isn't ASCII (the .bat is written in the system code page). PIDs are still only killed if the process looks like that node.This has to touch
concore.pybecause that's where the kill script is generated (_write_kill_script).Tests
test_write_kill_script_generates_bat_filenow checks the generated filter forcontroller.py(runs on any OS).test_kill_script_kills_concore_process(Windows only) now runs a realpython controller.pythat registers its own PID, like a node does. Before, it startedpython -c "..." concore_node, which put "concore" on the command line and hid the problem.Manual on Windows 11 (demo/sample,
maxtime.bat 100000, with #639 so run.bat starts the nodes): before,stop.batprinted "Skipping PID ... not a concore process" for both nodes and they kept running; after, it prints "Killing concore process " for both and no node processes are left.Not in this PR:
concore.javahas the samefindstr /i "concore"check — I can send that as a separate Java-only PR.