From owner-cvs-all Tue Apr 28 07:13:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA29360 for cvs-all-outgoing; Tue, 28 Apr 1998 07:13:04 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA29267 for ; Tue, 28 Apr 1998 07:12:58 -0700 (PDT) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.8/8.7.3) id QAA08244; Tue, 28 Apr 1998 16:12:54 +0200 (CEST) Message-ID: <19980428161254.15113@cons.org> Date: Tue, 28 Apr 1998 16:12:54 +0200 From: Martin Cracauer To: cvs-commiters@FreeBSD.ORG Subject: /bin/sh patch review Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=6TrnltStXW4iwmi0 X-Mailer: Mutt 0.89i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii I plan to commit my fix to PR 6047 (appended below or see http://www.freebsd.org/cgi/query-pr.cgi?pr=6047). If you don't like it, please speak up. I ran a shell with this fix for some time and didn't run into problems. Researching whether passing EV_BACKCMD or EV_EXIT at this point is needed as well is a greater effort, so I left these flags as they were. I could imagine EV_BACKCMD is needed in the case of a shell function called within backquotes and similar constructs, but I think it makes sense to commit the EV_TESTED fix until further understanding is gained, as it fixes the only case that came up so far. If I commit it, should I include a sourcecode comment indicating the other flag issues or is it sufficient to do so in the commit message? Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer cracauer@wavehh.hanse.de (batched, preferred for large mails) Tel.: (daytime) +4940 41478712 Fax.: (daytime) +4940 41478715 Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sh-exit.diff" *** /usr/src/bin/sh/eval.c Wed Mar 25 16:43:53 1998 --- eval.c Fri Apr 3 20:32:12 1998 *************** *** 764,770 **** for (sp = varlist.list ; sp ; sp = sp->next) mklocal(sp->text); funcnest++; ! evaltree(cmdentry.u.func, 0); funcnest--; INTOFF; poplocalvars(); --- 764,773 ---- for (sp = varlist.list ; sp ; sp = sp->next) mklocal(sp->text); funcnest++; ! if (flags & EV_TESTED) ! evaltree(cmdentry.u.func, EV_TESTED); ! else ! evaltree(cmdentry.u.func, 0); funcnest--; INTOFF; poplocalvars(); --6TrnltStXW4iwmi0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message