summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorOlof Sivertsson <osivertsson@gmail.com>2016-09-08 08:32:43 +0200
committerCraig Small <csmall@enc.com.au>2016-09-11 09:58:55 +1000
commit95ed10ff438ee1c850bbd235f1bd98e6113ccfe6 (patch)
tree4d3fb975f29aa033373c601789912eab882be713 /testsuite
parente02d9f554d614843108a2148a51b331e65c09169 (diff)
downloadprocps-ng-95ed10ff438ee1c850bbd235f1bd98e6113ccfe6.tar.gz
kill: Fix free() with bad pointer on SIG-prefixed signal-name
kill -l SIGHUP (or any other signal-name prefixed with "SIG") would cause free() to be called with a bad pointer instead of a pointer to what was allocated. Fix this and add test-case.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/kill.test/kill.exp4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/kill.test/kill.exp b/testsuite/kill.test/kill.exp
index 1668ac4..211395c 100644
--- a/testsuite/kill.test/kill.exp
+++ b/testsuite/kill.test/kill.exp
@@ -24,6 +24,10 @@ set test "kill convert signal name to number"
spawn $kill -lHUP
expect_pass "$test" "^1\\s*"
+set test "kill convert SIG-prefixed signal name to number"
+spawn $kill -lSIGHUP
+expect_pass "$test" "^1\\s*$"
+
set test "kill convert signal number to name"
spawn $kill -l 1
expect_pass "$test" "^HUP\\s*"