Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: prob: fg not sending CONT to 'make' children



On Sep 1, 10:08am, Sven Wischnowsky wrote:
} Subject: Re: prob: fg not sending CONT to 'make' children
}
} Bart Schaefer wrote:
} 
} > Really?  It doesn't look to me as though it changes that behavior at all.
} 
} So, err is only set to -1 if (and always if) a kill fails with an
} intersting error and if another kill() later succeeds it will not be
} reset to zero -- that's certainly different from before, isn't it?

Yes, it is; sorry about that.  I'd already done a patch to my local copy
where I used `err |= kill(...);' rather than `if (kill(...)) err = -1;'
and I didn't think hard enough when resolving the conflicts.


Index: Src/signals.c
===================================================================
@@ -593,15 +593,15 @@
                 for (pn = jobtab[jn->other].procs; pn; pn = pn->next)
                     if (killpg(pn->pid, sig) == -1)
 			if (kill(pn->pid, sig) == -1 && errno != ESRCH)
-			    err |= -1;
+			    err = -1;
  
                 for (pn = jn->procs; pn->next; pn = pn->next)
                     if (kill(pn->pid, sig) == -1 && errno != ESRCH)
-			err |= -1;
+			err = -1;
 
 		if (!jobtab[jn->other].procs && pn)
 		    if (kill(pn->pid, sig) == -1 && errno != ESRCH)
-			err |= -1;
+			err = -1;
 
                 return err;
             }
@@ -609,7 +609,7 @@
 		err = -1;
 		
 	    if (killpg(jn->gleader, sig) == -1 && errno != ESRCH)
-		err |= -1;
+		err = -1;
 
 	    return err;
         }

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author