about summary refs log tree commit diff
path: root/Src/signals.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-31 19:02:02 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-31 19:02:02 +0000
commit5d25a9b2c48a09dc8c78cb6739759e3682a14d88 (patch)
treec7fa9ec008c7422a28492dad46ae057ed2a504d4 /Src/signals.c
parentb785e1b02fdb04d68c1b7d1bd76bf28c5dac28cb (diff)
downloadzsh-5d25a9b2c48a09dc8c78cb6739759e3682a14d88.tar.gz
zsh-5d25a9b2c48a09dc8c78cb6739759e3682a14d88.tar.xz
zsh-5d25a9b2c48a09dc8c78cb6739759e3682a14d88.zip
zsh-workers/7584
Diffstat (limited to 'Src/signals.c')
-rw-r--r--Src/signals.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/Src/signals.c b/Src/signals.c
index 94cf1099f..e5ee5dded 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -593,38 +593,23 @@ killjb(Job jn, int sig)
                 for (pn = jobtab[jn->other].procs; pn; pn = pn->next)
                     if (killpg(pn->pid, sig) == -1)
 			if (kill(pn->pid, sig) == -1 && errno != ESRCH)
-#ifdef BROKEN_KILL_ESRCH
-			    if(errno != EINVAL || sig != 0)
-#endif /* BROKEN_KILL_ESRCH */
-				err = -1;
+			    err |= -1;
  
                 for (pn = jn->procs; pn->next; pn = pn->next)
                     if (kill(pn->pid, sig) == -1 && errno != ESRCH)
-#ifdef BROKEN_KILL_ESRCH
-			if(errno != EINVAL || sig != 0)
-#endif /* BROKEN_KILL_ESRCH */
-			    err = -1;
+			err |= -1;
 
 		if (!jobtab[jn->other].procs && pn)
 		    if (kill(pn->pid, sig) == -1 && errno != ESRCH)
-#ifdef BROKEN_KILL_ESRCH
-			if(errno != EINVAL || sig != 0)
-#endif /* BROKEN_KILL_ESRCH */
-			    err = -1;
+			err |= -1;
 
                 return err;
             }
             if (killpg(jobtab[jn->other].gleader, sig) == -1 && errno != ESRCH)
-#ifdef BROKEN_KILL_ESRCH
-		if(errno != EINVAL || sig != 0)
-#endif /* BROKEN_KILL_ESRCH */
-		    err = -1;
+		err = -1;
 		
 	    if (killpg(jn->gleader, sig) == -1 && errno != ESRCH)
-#ifdef BROKEN_KILL_ESRCH
-		if(errno != EINVAL || sig != 0)
-#endif /* BROKEN_KILL_ESRCH */
-		    err = -1;
+		err |= -1;
 
 	    return err;
         }
@@ -632,10 +617,7 @@ killjb(Job jn, int sig)
 	    return killpg(jn->gleader, sig);
     }
     for (pn = jn->procs; pn; pn = pn->next)
-        if ((err = kill(pn->pid, sig)) == -1 && errno != ESRCH)
-#ifdef BROKEN_KILL_ESRCH
-          if(errno != EINVAL || sig != 0)
-#endif /* BROKEN_KILL_ESRCH */
+        if ((err = kill(pn->pid, sig)) == -1 && errno != ESRCH && sig != 0)
             return -1;
     return err;
 }