** Description changed:

  [Impact]
  
- Uppercase signal names are no longer accepted by killall; only lowercase
- signal names are accepted. The documentation still shows signal names in
- uppercase.
+  * Not all Uppercase signal names are accepted by killall in the new 
+    version (INT + ILL + VTALRM will not work)
  
- This is a regression as of bionic.
+  * 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
  
- # killall -int asdf
- asdf: no process found
- # killall -INT asdf
- Usage: killall [ -Z CONTEXT ] [ -u USER ] [ -y TIME ] [ -o TIME ] [ -eIgiqrvw 
]
-                [ -s SIGNAL | -SIGNAL ] NAME...
+ #!/bin/bash
+ #set -x
+ TNAME="uninitialized"
+ 
+ testkillall () {
+         local tsig=${1}
+         /tmp/${TNAME} /dev/urandom &
+         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
+         TNAME="test${sig}"
+         cp /usr/bin/md5sum "/tmp/${TNAME}"
+         testkillall "$(echo ${sig} | tr '[:lower:]' '[:upper:]')"
+         testkillall "SIG$(echo ${sig} | tr '[:lower:]' '[:upper:]')"
+         #testkillall "$(echo ${sig} | tr '[:upper:]' '[:lower:]')"
+         rm -f "/tmp/${TNAME}"
+         sync
+ done
+ 
  
  [Regression Potential]
  
- This is a regression, and so there would be no regression potential in a
- fix.
+  * 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806060

Title:
  Newer versions of killall (Ubuntu 18.04+) fail when signal specified
  in capitals

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/psmisc/+bug/1806060/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to