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

Re: fg/bg on FreeBSD.



In article <200005080848.KAA12669@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> > >           if (setpgrp(0L, jobtab[list_pipe_job].gleader) == -1 ||
> > > 	      killpg(jobtab[list_pipe_job].gleader, 0) == -1) {
> > 
> > Wow!  It's good idea.
> 
> Indeed. Why no patch for this? In other words: have I missed something?

OK.  This is the patch.  (I'll commit this.)

Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.7
diff -u -r1.7 exec.c
--- Src/exec.c	2000/05/04 13:40:05	1.7
+++ Src/exec.c	2000/05/08 09:15:31
@@ -2466,8 +2466,8 @@
 	}
     } else if (thisjob != -1 && cl) {
 	if (jobtab[list_pipe_job].gleader && (list_pipe || list_pipe_child)) {
-	    if (killpg(jobtab[list_pipe_job].gleader, 0) == -1 ||
-		setpgrp(0L, jobtab[list_pipe_job].gleader) == -1) {
+	    if (setpgrp(0L, jobtab[list_pipe_job].gleader) == -1 ||
+		killpg(jobtab[list_pipe_job].gleader, 0) == -1) {
 		jobtab[list_pipe_job].gleader =
 		    jobtab[thisjob].gleader = (list_pipe_child ? mypgrp : getpid());
 		setpgrp(0L, jobtab[list_pipe_job].gleader);
-- 
Tanaka Akira



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