fix(collector): daemonize background subprocesses with start_new_session
Collector and mutator watcher subprocesses were spawned without start_new_session=True, leaving them in the parent's process group. SIGHUP (sent when the controlling terminal closes) killed both processes silently — stdout/stderr were DEVNULL so the crash was invisible. Also update test_services and test_composer to reflect the ssh plugin no longer using Cowrie env vars (replaced with SSH_ROOT_PASSWORD / SSH_HOSTNAME matching the real_ssh plugin).
This commit is contained in:
@@ -390,7 +390,8 @@ def deploy(
|
||||
subprocess.Popen( # nosec B603
|
||||
[sys.executable, "-m", "decnet.cli", "mutate", "--watch"],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.STDOUT
|
||||
stderr=subprocess.STDOUT,
|
||||
start_new_session=True,
|
||||
)
|
||||
except (FileNotFoundError, subprocess.SubprocessError):
|
||||
console.print("[red]Failed to start mutator watcher.[/]")
|
||||
@@ -405,6 +406,7 @@ def deploy(
|
||||
[sys.executable, "-m", "decnet.cli", "collect", "--log-file", str(effective_log_file)],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.STDOUT,
|
||||
start_new_session=True,
|
||||
)
|
||||
|
||||
if api and not dry_run:
|
||||
|
||||
Reference in New Issue
Block a user