Fix command executor timeout handling and add detached mode
- Add detached mode for long-running processes via detached=true config - Fix process termination on timeout using process groups and kill -TERM/-KILL - Remove double shell wrapping that was breaking command execution - Track PIDs via wrapper script to enable proper process cleanup - Flush port messages after timeout to prevent Tortoise MQTT errors - Update example config to demonstrate detached command usage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,14 @@ command = "ping"
|
||||
allowed_params = ["-c", "4", "8.8.8.8", "google.com", "1.1.1.1"]
|
||||
description = "Network connectivity test"
|
||||
|
||||
# Example of a detached command for long-running processes
|
||||
[[commands.available]]
|
||||
trigger = "start_app"
|
||||
command = "firefox"
|
||||
detached = true # Don't wait for the process to exit, just launch it
|
||||
timeout = 5 # Timeout only applies to launching, not running
|
||||
description = "Start Firefox browser (detached)"
|
||||
|
||||
[logging]
|
||||
level = "info" # debug, info, warn, error
|
||||
log_config_changes = true
|
||||
|
||||
Reference in New Issue
Block a user