From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12681 invoked from network); 7 May 1998 17:15:21 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 May 1998 17:15:21 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id NAA19702; Thu, 7 May 1998 13:10:55 -0400 (EDT) Resent-Date: Thu, 7 May 1998 13:10:42 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199805071710.MAA48260@frontiernet.net> Subject: Re: zsh vs. ksh coproc redirection semantics In-Reply-To: <980507021807.ZM16856@candle.brasslantern.com> from Bart Schaefer at "May 7, 98 02:18:06 am" To: zsh-users@math.gatech.edu Date: Thu, 7 May 1998 12:10:49 -0500 (CDT) X-Mailer: ELM [version 2.4ME+ PL35 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"1_Tnh1.0.Hp4.HiUKr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1527 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bart wrote: > I'm curious. In zsh and bash (which also lacks the <&digit- form), <&- > closes the standard input of whatever command it suffixes, not of the > shell itself. Which must mean that (semantically, if not in actual > implementation) stdin is first dup'd (as it always is when running a > new command) and then the dup is closed. When running an external command the stdin is closed after fork thus not affecting the shell. Non special builtins should behave like external commands. Now the >&p case seems to be special in pdksh, as this does affect the shell. It looks like these coproc redirection really works well only with exec, the rest is implementation dependent. Zoli