summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorherbert <herbert@gondor.apana.org.au>2004-08-07 13:48:42 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2005-09-26 18:33:02 +1000
commit4808da77b5e8fd6f1aa3aeb83c0d53f31016c97c (patch)
tree28055e4f4d187253bef4a1ba5796383d07e40304 /src
parentFixed cd - when OLDPWD is unset. (diff)
downloaddash-4808da77b5e8fd6f1aa3aeb83c0d53f31016c97c.tar.gz
dash-4808da77b5e8fd6f1aa3aeb83c0d53f31016c97c.zip
Allow negative pid argument to kill(1) in src/jobs.c.
Diffstat (limited to '')
-rw-r--r--src/jobs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jobs.c b/src/jobs.c
index 10d3cfd..132c47a 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -328,7 +328,8 @@ usage:
 			jp = getjob(*argv, 0);
 			pid = -jp->ps[0].pid;
 		} else
-			pid = number(*argv);
+			pid = **argv == '-' ?
+				-number(*argv + 1) : number(*argv);
 		if (kill(pid, signo) != 0) {
 			sh_warnx("%s\n", strerror(errno));
 			i = 1;