From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26091 invoked by alias); 22 Aug 2010 05:03:10 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15316 Received: (qmail 15457 invoked from network); 22 Aug 2010 05:03:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <100821220255.ZM32169@torch.brasslantern.com> Date: Sat, 21 Aug 2010 22:02:55 -0700 In-reply-to: <20100821223146.GD16241@prunille.vinc17.org> Comments: In reply to Vincent Lefevre "Re: Synchronous vs. Asynchronous" (Aug 22, 12:31am) References: <100820083501.ZM29362@torch.brasslantern.com> <20100820164507.419dc0bc@csr.com> <100820103638.ZM29775@torch.brasslantern.com> <20100821194122.583e05e4@pws-pc> <20100821223146.GD16241@prunille.vinc17.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Synchronous vs. Asynchronous MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Aug 22, 12:31am, Vincent Lefevre wrote: } } Under Mac OS X, I get: } } prunille% cat >(sleep 100) } cat: /dev/fd/31: Permission denied I'm pretty sure PWS meant >>(sleep 100); cat is going to try to read from its filename argument, and >(...) is opening a write-only socket, so what's more surprising is that it doesn't give an error elsewhere. macadamia[502] ls -l >(sleep 100) prw-rw---- 0 schaefer staff 0 Aug 21 21:47 /dev/fd/12| } Under Linux: } } xvii% cat >(sleep 100) } ^C^C^C^C^C torch[594] ls -l >(sleep 10) l-wx------ 1 schaefer schaefer 64 Aug 21 21:52 /proc/self/fd/12 -> pipe:[1059569] Seems like "cat" should have complained about a read-only file there, I wonder why it doesn't. Oh: torch[599] ls -Ll >(sleep 10) 4.2.0 prw------- 1 schaefer schaefer 0 Aug 21 21:55 /proc/self/fd/12| So the pipe to which /dev/fd/12 points behaves as readable on Linux. } prunille% printf "a%s\n" {1..9} >>(while read s; do sleep 1; echo $s; done) } a1 } a2 } a3 } ^Ca4 } ^C^C^Ca5 } ^C^C^Ca6 } ^C^Ca7 } a8 } a9 } prunille% } } is uninterruptible Hmm, under 4.3.9 that's interruptible on MacOS: macadamia[505] printf "a%s\n" {1..9} >>(while read s; do sleep 1; echo $s; done) a1 a2 a3 ^C% macadamia[506] a4 a5 a6 a7 a8 a9 With the latest CVS, it is not interruptible. I'm not sure which change would have brought that on.