Skip to content

fix: replace raw substring match with real markers when detecting concore processes - #581

Merged
pradeeban merged 2 commits into
ControlCore-Project:devfrom
bhuvan-somisetty:fix/stop-status-process-match
Oct 5, 2026
Merged

pradeeban merged 2 commits into
ControlCore-Project:devfrom
bhuvan-somisetty:fix/stop-status-process-match

Conversation

@bhuvan-somisetty

@bhuvan-somisetty bhuvan-somisetty commented Sep 14, 2026 •

Copy link
Copy Markdown

Fixes #580

concore stop and concore status treated any process with "concore" anywhere in its cmdline as a concore process. Something run from a folder that just happens to be named concore (like the default clone dir) would match, and concore stop could force kill it.

Changes:

  • moved the check into a shared is_concore_process() in concore_cli/commands/_process_match.py, used by both commands
  • a process now only matches if its cmdline points at the generated concorekill.bat, or its working directory has the runtime files mkconcore.py writes into every study (concore.iport plus concore.py/concoredocker.py)
  • added tests/test_process_match.py, including a case for a process launched from a folder literally named concore

Only the process discovery step changed, the actual kill logic is untouched.

Verified with:
pytest tests/ -q (197 passed, 7 skipped)

concore stop / concore status flagged any process as a concore process
just because "concore" appeared anywhere in its cmdline. That matches
anything run from a directory that happens to be named "concore"
(the default clone directory name for this repo), which has nothing to
do with a real concore node and would get force killed on the next
concore stop.

Match is now based on the generated concorekill.bat filename, or on the
process's actual working directory containing the runtime marker files
mkconcore.py writes into every generated study (concore.iport plus
concore.py/concoredocker.py), instead of a plain text search.

Fixes ControlCore-Project#580
os.path.basename on Linux doesn't split on backslashes, so a cmdline
entry like C:\studies\run1\concorekill.bat never matched there and
the test failed in CI. ntpath.basename handles both separators.
@pradeeban
pradeeban merged commit 788b226 into ControlCore-Project:dev Oct 5, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants