[PATCH V3 0/4] unshare: add --forward-signals option

Kiran Rangoon <[email protected]> Fri, 16 Jan 2026 12:06:44 -0500
Newsgroups org.kernel.vger.util-linux
Message-ID <[email protected]>
This series adds a new --forward-signals option to unshare that forwards
SIGTERM and SIGINT from the parent process to the child. This allows child
processes to handle graceful shutdown during system reboot or service
manager termination.

Changes in V3:
- Add bash completion for --forward-signals
- Add usage text in help output
- Fix code indentation to match project style
- Improve test synchronization (replace fixed sleep with adaptive polling)
- Add namespace capability checks in tests to prevent CI failures

Kiran Rangoon (4):
  unshare: add --forward-signals option to argument parser
  unshare: implement signal forwarding when --forward-signals is used
  unshare: document --forward-signals in man page
  tests: add tests for unshare --forward-signals

 bash-completion/unshare                       |  1 +
 sys-utils/unshare.1.adoc                      | 13 ++++
 sys-utils/unshare.c                           | 64 ++++++++++++++--
 tests/expected/unshare/forward-signals        |  1 +
 .../unshare/forward-signals-kill-child        |  1 +
 tests/ts/unshare/forward-signals              | 73 ++++++++++++++++++
 tests/ts/unshare/forward-signals-kill-child   | 74 +++++++++++++++++++
 7 files changed, 222 insertions(+), 5 deletions(-)
 create mode 100644 tests/expected/unshare/forward-signals
 create mode 100644 tests/expected/unshare/forward-signals-kill-child
 create mode 100755 tests/ts/unshare/forward-signals
 create mode 100755 tests/ts/unshare/forward-signals-kill-child

-- 
2.47.3