Comment 8 for bug 1806060

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

All lower case i dangerous, as it actually (can) mean the lower case options.
So for example

-int means "interactive" and it will ask
  + killall -int testINT
  + /tmp/testINT /dev/urandom
  Kill testINT(4931) ? (y/N)

But the upper cases should work as specified.
Just the text is misleading it is not "when specified in capitals" as -int != -INT

But it is true that some options do not work.

Test:
#!/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

Results:
- Disco with 23.2-1 all good
- Cosmic with 23.1-1 broken on: INT + ILL + VTALRM