From owner-freebsd-bugs@FreeBSD.ORG Sun Jul 13 01:40:26 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05AB537B401 for ; Sun, 13 Jul 2003 01:40:26 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 914BA43F75 for ; Sun, 13 Jul 2003 01:40:25 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h6D8ePUp026233 for ; Sun, 13 Jul 2003 01:40:25 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h6D8ePoh026232; Sun, 13 Jul 2003 01:40:25 -0700 (PDT) Date: Sun, 13 Jul 2003 01:40:25 -0700 (PDT) Message-Id: <200307130840.h6D8ePoh026232@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: David Malone Subject: Re: bin/52746 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Malone List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 08:40:26 -0000 The following reply was made to PR bin/52746; it has been noted by GNATS. From: David Malone To: Kris Kennaway Cc: freebsd-gnats-submit@FreeBSD.org, marka@isc.org, dwmalone@FreeBSD.org Subject: Re: bin/52746 Date: Sun, 13 Jul 2003 09:34:39 +0100 > David, can you forward your analysis to the tcsh maintainer, Christos > Zoulas ? I have tried to email him recently > about this myself, but he bounces my emails. I got a patch from Christos, but while testing I found that it caused problems with running subcommands in vim. I haven't had time to investigate further. I've let Christos know about that too. I've included the patch below, in case anyone wants to do more testing or debugging of it. We could probably work around the problem by disabling the use of vfork under FreeBSD. David. Index: sh.proc.c =================================================================== RCS file: /src/pub/tcsh/sh.proc.c,v retrieving revision 3.79 diff -u -u -r3.79 sh.proc.c --- sh.proc.c 26 May 2003 07:11:07 -0000 3.79 +++ sh.proc.c 3 Jun 2003 13:10:48 -0000 @@ -602,8 +602,15 @@ while ((fp = (fp->p_friends)) != pp); if ((jobflags & PRUNNING) == 0) break; + if (kill(-fp->p_procid, 0) == -1 && errno == ESRCH) { #ifdef JOBDEBUG - xprintf("%d starting to sigpause for SIGCHLD on %d\n", + xprintf("%d child %d already exited\n", + getpid(), fp->p_procid); +#endif /* JOBDEBUG */ + break; + } +#ifdef JOBDEBUG + xprintf("%d starting to sigpause for SIGCHLD on %d\n", getpid(), fp->p_procid); #endif /* JOBDEBUG */ #ifdef BSDSIGS