![@ghost](https://github.com/ghost.png?size=80)
Description
Describe the bug
toolbox run
command isn't terminated properly when terminal emulator is exited, causing processes to linger around without user's awareness.
Steps how to reproduce the behaviour
- Open System Monitor / Task Manager equivilent in your desktop environment
- Search for
sleep
- Execute the following command in a terminal emulator (GNOME Terminal):
toolbox run sleep 30
- Before
sleep
runs out of time, try to close the terminal emulator - It'll prompt for something like this:
Insist closing it by pressing Close Terminal
.
Expected behaviour
sleep
process is terminated.
Actual behaviour
sleep
keeps lingering around.
Output of toolbox --version
(v0.0.90+)
toolbox version 0.0.99.3
Toolbox package info (rpm -q toolbox
)
toolbox-0.0.99.3-6.fc36.x86_64
Output of podman version
Client: Podman Engine
Version: 4.2.1
API Version: 4.2.1
Go Version: go1.18.5
Built: Thu Sep 8 03:58:19 2022
OS/Arch: linux/amd64
Podman package info (rpm -q podman
)
podman-4.2.1-2.fc36.x86_64
Info about your OS
Fedora Silverblue 36
Additional context
This is a screenshot which represent the issue better:
If I try to close the terminal emulator, it'll prompt the following:
If I press "Close Terminal",
sh
,toolbox
andpodman
(which runsexec
command) will be terminated because they're child process of the vte session.However, notice the
conmon
and its child processsleep
aren't part ofgnome-terminal-server
. Whensh
is terminated,podman
(exec
command) will be terminated but the correspondingconmon
process will be kept intact. As a result,sleep 30
isn't terminated properly.And
sleep 30
is only used for demonstration. In reality one could run something resource intensive, and then close the terminal emulator not knowing they're lingering in the background.
Source: #1204