From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22039 invoked from network); 3 Apr 2000 09:49:29 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Apr 2000 09:49:29 -0000 Received: (qmail 9955 invoked by alias); 3 Apr 2000 09:49:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10403 Received: (qmail 9936 invoked from network); 3 Apr 2000 09:49:15 -0000 From: "Bart Schaefer" Message-Id: <1000403094847.ZM18721@candle.brasslantern.com> Date: Mon, 3 Apr 2000 09:48:46 +0000 In-Reply-To: <000301bf9d3b$c9062e40$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "Q about <(...)" (Apr 3, 11:11am) References: <000301bf9d3b$c9062e40$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , "ZSH workers mailing list" Subject: Re: Q about <(...) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 3, 11:11am, Andrej Borsenkow wrote: } Subject: Q about <(...) } } pkgadd: ERROR: attempt to process datastream failed } - open of failed, errno=9 } } Manual states, that <(...) creates a FIFO and passes it's name as } argument ... obviously, it is not the case - it is simply passing opened } file descriptor. Not true, exactly: zagzig[21] /bin/echo <(: foo) /proc/self/fd/11 Zsh is over-optimizing a bit in this case; because PATH_DEV_FD was defined at compile time, zsh simply uses that existing file name instead of making its own new FIFO. } As all files are closed by sudo this fails. That's the unfortunate bit. Zsh is making an unwarranted assumption that the file descriptor it opened will still be open by the time the file name is referenced. For guaranteed correct operation, we should remove the PATH_DEV_FD code from getproc() in exec.c, or (perhaps better) change it to be used only if mkfifo() is absent or fails. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com