summaryrefslogtreecommitdiff
path: root/source/ap/ksh93/patches/ksh-20130214-fixkill.patch
blob: 0862880ddadc6f3ea3821c7932d2ad3ea915a71f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff -up ksh-20130214/src/cmd/ksh93/sh/jobs.c.fixkill ksh-20130214/src/cmd/ksh93/sh/jobs.c
--- ksh-20130214/src/cmd/ksh93/sh/jobs.c.fixkill	2012-09-26 17:43:04.000000000 +0200
+++ ksh-20130214/src/cmd/ksh93/sh/jobs.c	2013-02-22 16:38:05.080161740 +0100
@@ -1104,6 +1104,8 @@ static struct process *job_bystring(regi
 
 int job_kill(register struct process *pw,register int sig)
 {
+	if(pw==0)
+		goto error;
 	Shell_t	*shp = pw->p_shp;
 	register pid_t pid;
 	register int r;
@@ -1127,8 +1129,6 @@ int job_kill(register struct process *pw
 #endif	/* SIGTSTP */
 	job_lock();
 	errno = ECHILD;
-	if(pw==0)
-		goto error;
 	pid = pw->p_pid;
 #if SHOPT_COSHELL
 	if(pw->p_cojob)