4 ms·
All I ever wanted was to type ^C (or perhaps ^\) in my terminal and kill in one fell swoop all the shite that my previous shell-typed command spawned directly
by ur-whale 4y ago
All I ever wanted was to type ^C (or perhaps ^\) in my terminal and kill in one fell swoop all the shite that my previous shell-typed command spawned directly or indirectly.
This, IIRC used to be the standard behavior back in the days, but in recent years, for some reasons, things have not been so simple.
Looking at the man page of ps(1) sort of starts to elucidate the effing mess that the name "group" summons the in unix process world.
Are we talking about the real group id (RGID), the effective group id (EGID), the controlling progress group id (TPGID), the control group (CGROUP) the textual group id (EGROUP), the filesystem group id (FGID), the textual filesystem group id (FGID), the process id of the process group leader (PGID), the saved group id (SGID), the session id (SID), the supplementary group id (SUPGID), the thread group id (TGID) ?
I'm pretty sure I'm missing some.
What an effing mess.
- yrro 4y agoSee https://man7.org/linux/man-pages/man7/credentials.7.html https://man7.org/linux/man-pages/man7/credentials.7.html and https://www.gnu.org/software/libc/manual/html_node/Job-Control.html https://www.gnu.org/software/libc/manual/html_node/Job-Contr...
- ur-whale 4y agoI rest my case.
- throwawaylinux 4y ago> This, IIRC used to be the standard behavior back in the days, Catching SIGINT and detaching from the controlling terminal are pretty old concepts.
- bandie91 4y ago> kill [...] shell-typed command spawned directly or indirectly are you sure? let's assume you typed "service httpd start". it starts the init script which starts the httpd in the background. IMO most in use-cases you don't want to kill everything ever forked from the current shell.
- JdeBP 4y agoAs well as getting how "service" commands operate wrong, you are conflating a "background" process associated with a TTY with a daemon. Some "service" commands work the way that you describe. But that is actually a bug. A properly designed "service" command does not execute as some direct or indirect parent process of the eventual "httpd" process. The "service" command runs in a login session. A daemon has (at least as an intention) no association with a TTY. The daemon process runs in a context that has never been tainted by any of the various things associated with login sessions. * http://jdebp.info./Softwares/nosh/bsd-service-command.html http://jdebp.info./Softwares/nosh/bsd-service-command.html
- Kinrany 4y agoThe word "group" smells of an anti-pattern in any context to me.
- smilliken 4y agoI agree in spirit, but here's one of the most successful abstractions of all time: https://en.m.wikipedia.org/wiki/Group_(mathematics) https://en.m.wikipedia.org/wiki/Group_(mathematics)