]> git.ipfire.org Git - thirdparty/util-linux.git/commit
Add new setpgid utility
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 20 Aug 2023 09:42:51 +0000 (11:42 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 31 Aug 2023 08:13:30 +0000 (10:13 +0200)
commitf092076fecc7ada2911df1b34f75091573ac08a8
tree6396d01ab3b0ab94449d34af718d19df2462b20b
parent2b99ee2526ae61be761b0e31c50e106dbec5e9e4
Add new setpgid utility

This program allows running a command in a new process group and
optionally makes the new process group the foreground process group
of the ctty.

This is useful when running programs through wrappers programs (think
bubblewrap, ...) and wanting to make sure that SIGINT is only sent to
the innermost process. This is possible by putting the innermost process
in a new process group and making that process group the foreground process
group of the controlling terminal.

By adding a separate utility to util-linux, we can apply this to any
program even if the program itself doesn't implement this functionality.
33 files changed:
bash-completion/Makemodule.am
bash-completion/setpgid [new file with mode: 0644]
configure.ac
meson.build
sys-utils/Makemodule.am
sys-utils/meson.build
sys-utils/setpgid.1.adoc [new file with mode: 0644]
sys-utils/setpgid.c [new file with mode: 0644]
tests/commands.sh
tests/expected/build-sys/config-all
tests/expected/build-sys/config-all-devel
tests/expected/build-sys/config-all-non-nls
tests/expected/build-sys/config-audit
tests/expected/build-sys/config-chfnsh-libuser
tests/expected/build-sys/config-chfnsh-no-password
tests/expected/build-sys/config-chfnsh-pam
tests/expected/build-sys/config-core
tests/expected/build-sys/config-cryptsetup
tests/expected/build-sys/config-devel
tests/expected/build-sys/config-devel-new-mount
tests/expected/build-sys/config-devel-non-asan
tests/expected/build-sys/config-devel-non-docs
tests/expected/build-sys/config-non-libblkid
tests/expected/build-sys/config-non-libmount
tests/expected/build-sys/config-non-libs
tests/expected/build-sys/config-non-libsmartcols
tests/expected/build-sys/config-non-libuuid
tests/expected/build-sys/config-non-nls
tests/expected/build-sys/config-selinux
tests/expected/build-sys/config-slang
tests/expected/build-sys/config-static
tests/expected/misc/setpgid [new file with mode: 0644]
tests/ts/misc/setpgid [new file with mode: 0755]