davsclaus opened a new pull request, #30027:
URL: https://github.com/apache/camel/pull/30027

   JIRA: [CAMEL-26929](https://issues.apache.org/jira/browse/CAMEL-26929), item 
7 (camel stop without a name). Decided by Claus: require `--all` when two or 
more integrations run.
   
   ## The problem
   
   `camel stop` without a name stopped every running integration, and without a 
terminal it did not ask. During the CLI scan, one AI agent's bare `camel stop` 
stopped the integrations of the other agents; it would stop the user's own too.
   
   ## The change
   
   - Without a name, `camel stop` stops the one integration that runs, as 
before.
   - When two or more run, it stops none, lists them and exits with 2:
     ```
     ERROR: 2 Camel integrations are running: tick26937 (PID: 31685), bg26937 
(PID: 39850). Give the name or pid of the one to stop, or --all to stop them all
     ```
   - `--all` stops them all; an explicit `camel stop '*'` still does too. 
`--all` together with a name is a usage error.
   
   This brings back `--all`. The Camel 4 migration guide records that it was 
removed when a bare `camel stop` became "stop all"; this PR reverses that for 
the case of several running integrations, as decided for 4.24.
   
   Checked with the launcher:
   - two running: a bare stop exits 2 and both keep running;
   - `camel stop <name>` stops one;
   - with one left, a bare stop stops it.
   
   ## Tests and docs
   
   - `StopProcessTest`: several running stops none (exit 2), `--all` stops 
both, `--all` with a name is a usage error. The process command, golden help, 
exit-code, JSON and no-terminal tests are green (320 tests).
   - `camel-jbang-managing.adoc`: the "stop all" example uses `--all`. Upgrade 
guide entry added. Commands metadata, the `camel stop` doc page and the golden 
help are regenerated.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to