After staring a game with tcli run, the tcli process will orphan the game process upon termination.
Expected Behavior
After running a game with tcli run, terminating the tcli process (e.g. Ctrl+C, SIGTERM/SIGKILL) should also terminate the game process.
Current Behavior
The game process remains running as an orphan process after the tcli run process is terminated.
Steps to Reproduce
- Start a managed game with
tcli e.g. tcli.exe run {game identifier}
- Verify both the
tcli and game process are running:
$ ps o pid,ppid,pgid,sid,start,time,cmd --forest
PID PPID PGID SID STARTED TIME CMD
142557 142556 142557 142557 00:17:29 00:00:00 -bash
142913 142557 142913 142557 00:34:16 00:00:00 \_ tcli run -- -name ModdedTest ..
142929 142913 142913 142557 00:34:17 00:00:02 \_ /home/valheim/valheim/server/valheim_server.x86_64 -name ModdedTest ...
- Terminate the
tcli process (e.g. pressing Ctrl+C in a shell or sending SIGTERM/SIGKILL with kill)
- Verify the
tcli process is terminated, but the game process is running and orphaned:
$ ps o pid,ppid,pgid,sid,start,time,cmd --forest
PID PPID PGID SID STARTED TIME CMD
142929 1 142913 142557 00:34:17 00:02:45 /home/valheim/valheim/server/valheim_server.x86_64 -name ModdedTest ...
Workaround
Manually terminate the game process with kill e.g. kill 142929 in example above.
Context (Environment)
Running tcli 0.2.0 with tcli-bepinex-installer 0.1.0 (compiled with an older glibc version) on Debian GNU/Linux 11 (bullseye)
After staring a game with
tcli run, thetcliprocess will orphan the game process upon termination.Expected Behavior
After running a game with
tcli run, terminating thetcliprocess (e.g.Ctrl+C,SIGTERM/SIGKILL) should also terminate the game process.Current Behavior
The game process remains running as an orphan process after the
tcli runprocess is terminated.Steps to Reproduce
tclie.g.tcli.exe run {game identifier}tcliand game process are running:tcliprocess (e.g. pressingCtrl+Cin a shell or sendingSIGTERM/SIGKILLwithkill)tcliprocess is terminated, but the game process is running and orphaned:$ ps o pid,ppid,pgid,sid,start,time,cmd --forest PID PPID PGID SID STARTED TIME CMD 142929 1 142913 142557 00:34:17 00:02:45 /home/valheim/valheim/server/valheim_server.x86_64 -name ModdedTest ...Workaround
Manually terminate the game process with
kille.g.kill 142929in example above.Context (Environment)
Running
tcli 0.2.0withtcli-bepinex-installer 0.1.0(compiled with an olderglibcversion) on Debian GNU/Linux 11 (bullseye)