From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12184 invoked from network); 8 May 2000 09:17:11 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 May 2000 09:17:11 -0000 Received: (qmail 23893 invoked by alias); 8 May 2000 09:16:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11247 Received: (qmail 23830 invoked from network); 8 May 2000 09:16:52 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: fg/bg on FreeBSD. References: <200005080848.KAA12669@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 08 May 2000 18:17:56 +0900 In-Reply-To: <200005080848.KAA12669@beta.informatik.hu-berlin.de> (Sven Wischnowsky's message of "Mon, 8 May 2000 10:48:49 +0200 (MET DST)") Message-ID: User-Agent: T-gnus/6.14.1 (based on Gnus v5.8.3) (revision 16) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i686-pc-linux-gnu) MULE/4.0 (HANANOEN) In article <200005080848.KAA12669@beta.informatik.hu-berlin.de>, Sven Wischnowsky 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