Received: by mail.netbsd.org (Postfix, from userid 605) id D44C585F1F; Thu, 31 Mar 2016 13:27:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id E9B3D85F08 for ; Thu, 31 Mar 2016 13:27:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 8rENwUnkHiVZ for ; Thu, 31 Mar 2016 13:27:44 +0000 (UTC) Received: from cvs.NetBSD.org (unknown [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 5E49684CE8 for ; Thu, 31 Mar 2016 13:27:44 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 542A8FBBA; Thu, 31 Mar 2016 13:27:44 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Thu, 31 Mar 2016 09:27:44 -0400 From: "Christos Zoulas" Subject: CVS commit: src/bin/sh To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20160331132744.542A8FBBA@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Christos Zoulas" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: christos Date: Thu Mar 31 13:27:44 UTC 2016 Modified Files: src/bin/sh: expand.c Log Message: After discussions with Jilles Tjoelker (FreeBSD shell) and following a suggestion from him, the way the fix to PR bin/50993 was implemented has changed a little. There are three steps involved in processing a here document, reading it, parsing it, and then evaluating it before applying it to the correct file descriptor for the command to use. The third of those is not related to this problem, and has not changed. The bug was caused by combining the first two steps into one (and not doing it correctly - which would be hard that way.) The fix is to split the first two stages into separate events. The original fix moved the 2nd stage (parsing) to just immediately before the 3rd stage (evaluation.) Jilles pointed out some unwanted side effects from doing it that way, and suggested moving the 2nd stage to immediately after the first. This commit makes that change. The effect is to revert the changes to expand.c and parser.h (which are no longer needed) and simplify slightly the change to parser.c. (from kre@) To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/bin/sh/expand.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.