Received: by mail.netbsd.org (Postfix, from userid 605) id 7EF4584E2A; Sat, 21 Dec 2019 18:54:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 02EBF84DE4 for ; Sat, 21 Dec 2019 18:54:16 +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 Nwx9IMwoolkw for ; Sat, 21 Dec 2019 18:54:15 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 8C4DE84C8B for ; Sat, 21 Dec 2019 18:54:15 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 808C9FA97; Sat, 21 Dec 2019 18:54:15 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 21 Dec 2019 18:54:15 +0000 From: "Robert Elz" Subject: CVS commit: src/bin/sh To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20191221185415.808C9FA97@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: "Robert Elz" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: kre Date: Sat Dec 21 18:54:15 UTC 2019 Modified Files: src/bin/sh: eval.c Log Message: Use fork() rather than vfork() when forking to run a background process with redirects. If we use vfork() and a redirect hangs (eg: opening a fifo) which the parent was intended to unhang, then the parent never gets to continue to unhang the child. eg: mkfifo f; cat f The parent should not be waiting for a background process, even just for its exec() to complete. if there are no redirects there is (should be) nothing left that might be done that will cause any noticeable delay, so vfork() should be safe in all other cases. To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.177 src/bin/sh/eval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.