From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21359 invoked from network); 6 May 2000 21:24:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 May 2000 21:24:13 -0000 Received: (qmail 1073 invoked by alias); 6 May 2000 21:24:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11240 Received: (qmail 1046 invoked from network); 6 May 2000 21:24:02 -0000 From: "Bart Schaefer" Message-Id: <1000506212352.ZM8935@candle.brasslantern.com> Date: Sat, 6 May 2000 21:23:52 +0000 In-Reply-To: Comments: In reply to Tanaka Akira "Re: fg/bg on FreeBSD." (May 7, 4:58am) References: <1000506170828.ZM2063@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Tanaka Akira , zsh-workers@sunsite.auc.dk Subject: Re: fg/bg on FreeBSD. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 7, 4:58am, Tanaka Akira wrote: } Subject: Re: fg/bg on FreeBSD. } } In article , } Tanaka Akira writes: } } > Possibly. But NetBSD has no problem... } } I found the difference between FreeBSD and NetBSD. } } FreeBSD fails to kill(-PGID,0) for zombie process but NetBSD (and } Linux) succeeds. } [...] } } I confirmed following modification prevents the problem. But } definitely this is too radical... } } Index: Src/exec.c } =================================================================== } - if (killpg(jobtab[list_pipe_job].gleader, 0) == -1 || } + if (/* killpg(jobtab[list_pipe_job].gleader, 0) == -1 || */ } setpgrp(0L, jobtab[list_pipe_job].gleader) == -1) { What happens if you reverse the order of the test? if (setpgrp(0L, jobtab[list_pipe_job].gleader) == -1 || killpg(jobtab[list_pipe_job].gleader, 0) == -1) { What I'm trying to discover is whether killpg() continues to fail after a process is successfully added to the group. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com