Newer versions of killall (Ubuntu 18.04+) fail when signal specified in capitals
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
psmisc (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Christian Ehrhardt | ||
Cosmic |
Fix Released
|
High
|
Christian Ehrhardt |
Bug Description
[Impact]
* Not all Uppercase signal names are accepted by killall in the new
version (INT + ILL + VTALRM will not work)
* by that the man page refers to things no more working and old scripts
might break.
[Test Case]
* run this and check if all signals were accepted by the commandline of killall
#!/bin/bash
TNAME="
testkillall () {
local tsig=${1}
local tpid=$!;
echo "TEST -${tsig}";
killall -${tsig} "${TNAME}"
kill -9 "${tpid}" 2>/dev/null;
kill -9 "${TNAME}" 2>/dev/null;
}
for sig in $(killall -l | xargs); do
cp /usr/bin/md5sum "/tmp/${TNAME}"
testkillall "$(echo ${sig} | tr '[:lower:]' '[:upper:]')"
testkillall "SIG$(echo ${sig} | tr '[:lower:]' '[:upper:]')"
rm -f "/tmp/${TNAME}"
sync
done
[Regression Potential]
* This reworks more of the argument parsing than one would like, but this
is due to one of such reworks being the breaking change in the former
version and a more minimal fix is hard to come up with.
Due to that obviously there could be "new" issues added to the argument
parsing. At least in this case we checked all signals and they worked
fine. Furthermore the new code also added a bunch of tests which work
fine since adding that.
[Other Info]
* This is a regression as of bionic.
---
[Original Description]
Newer versions of killall (Ubuntu 18.04+) display usage when the signal is passed like:
killall -INT <name>
and instead require it to be passed as:
killall -int <name>
In previous versions from Ubuntu 14.04 and 16.04, this doesn't happen. Is this a bug or a feature change? If so perhaps it should be noted in the usage information? The man page suggests capitals with "-SIGNAL". but that doesn't work any more.
Hamish
Related branches
- Andreas Hasenack: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 217 lines (+185/-0)5 files modifieddebian/changelog (+9/-0)
debian/patches/lp1806060-0001-killall-Fix-INT-option-parsing.patch (+49/-0)
debian/patches/lp1806060-0002-killall-change-to-getopt_long.patch (+37/-0)
debian/patches/lp1806060-0003-killall-Another-go-at-option-parsing.patch (+87/-0)
debian/patches/series (+3/-0)
- Andreas Hasenack: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 217 lines (+185/-0)5 files modifieddebian/changelog (+9/-0)
debian/patches/lp1806060-0001-killall-Fix-INT-option-parsing.patch (+49/-0)
debian/patches/lp1806060-0002-killall-change-to-getopt_long.patch (+37/-0)
debian/patches/lp1806060-0003-killall-Another-go-at-option-parsing.patch (+87/-0)
debian/patches/series (+3/-0)
Changed in psmisc (Ubuntu): | |
status: | New → Confirmed |
description: | updated |
Changed in psmisc (Ubuntu): | |
importance: | Undecided → High |
tags: | added: server-next |
description: | updated |
description: | updated |
Changed in psmisc (Ubuntu Bionic): | |
status: | Triaged → In Progress |
Changed in psmisc (Ubuntu Cosmic): | |
status: | Triaged → In Progress |
Changed in psmisc (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in psmisc (Ubuntu Cosmic): | |
importance: | Undecided → High |
Changed in psmisc (Ubuntu Bionic): | |
assignee: | nobody → Christian Ehrhardt (paelzer) |
Changed in psmisc (Ubuntu Cosmic): | |
assignee: | nobody → Christian Ehrhardt (paelzer) |
Note: Looks like this is present in Fedora as well, do I need to report this upstream somehow as well?