From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2072 invoked from network); 24 May 2000 15:00:39 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 May 2000 15:00:39 -0000 Received: (qmail 19080 invoked by alias); 24 May 2000 15:00:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11560 Received: (qmail 19073 invoked from network); 24 May 2000 15:00:30 -0000 Date: Wed, 24 May 2000 13:57:00 +0100 From: Peter Stephenson Subject: Re: FIFOs again In-reply-to: "Your message of Wed, 24 May 2000 16:16:29 +0400." <000001bfc579$e40a53e0$21c9ca95@mow.siemens.ru> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0FV200D2XEMZA8@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT > First, current docs are a bit incorrect. Shell passes FIFO or /dev/fd/n, > which is in reality pipe (if I understand implementation correctly). So, > both are not seekable, while docs imply, that only FIFO case is not. Ah, you mean because zsh supplies a pipe between the forked processes even if the device file is a real live file descriptor. Index: Doc/Zsh/expn.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v retrieving revision 1.17 diff -u -r1.17 expn.yo --- Doc/Zsh/expn.yo 2000/05/22 15:01:35 1.17 +++ Doc/Zsh/expn.yo 2000/05/24 12:56:17 @@ -320,13 +320,13 @@ the former case, some programmes may automatically close the file descriptor in question before examining the file on the command line, particularly if this is necessary for security reasons such as when the -programme is running setuid. In the second case, the file passed as an -argument to the command is a system pipe, so programs that expect to lseek -(see manref(lseek)(2)) on the file will not work; furthermore, if the +programme is running setuid. In the second case, if the programme does not actually open the file the subshell attempting to read from or write to the pipe will (in a typical implementation, different operating systems may have different behaviour) block for ever and have to -be killed explicitly. +be killed explicitly. In both cases, the shell actually supplies the +information using a pipe, so that programmes that expect to lseek +(see manref(lseek)(2)) on the file will not work. Also note that the previous example can be more compactly and efficiently written (provided the tt(MULTIOS) option is set) as: -- Peter Stephenson Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070