GNOME Bugzilla – Bug 793521
Tabs are closable if non-terminated jobs are stopped
Last modified: 2021-06-10 21:23:04 UTC
Found at https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1748797: Just like `gnome-terminal` refuses to close a tab or the window if a process is running in the foreground, it should refuse to close if a started job has been interrupted using Ctrl+Z.
Currently terminal_screen_has_foreground_process() calls tcgetpgrp() to figure out the PID of the foreground process, and checks if it differs from the shell it launched. In order to address the feature request, we'd need a different approach. E.g. on Linux: scan /proc/*/stat, look for processes with field #3 being T (stopped) and field #4 (ppid) matching the launched child. The pain point is that it's different on all OSes, but doing for Linux only would already be an improvement.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7830.