From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26904 invoked from network); 2 Oct 2008 08:18:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Oct 2008 08:18:43 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 25782 invoked from network); 2 Oct 2008 08:18:29 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Oct 2008 08:18:29 -0000 Received: (qmail 27447 invoked by alias); 2 Oct 2008 08:18:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25799 Received: (qmail 27425 invoked from network); 2 Oct 2008 08:18:09 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 2 Oct 2008 08:18:09 -0000 Received: from mail.o2.co.uk (jabba.london.02.net [82.132.130.169]) by bifrost.dotsrc.org (Postfix) with ESMTP id E25958030847 for ; Thu, 2 Oct 2008 10:18:04 +0200 (CEST) Received: from sc.homeunix.net (78.105.216.138) by mail.o2.co.uk (8.0.013.3) (authenticated as stephane.chazelas) id 48BF360205B2961B for zsh-workers@sunsite.dk; Thu, 2 Oct 2008 09:20:01 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1KlJNm-0001Y0-P4 for zsh-workers@sunsite.dk; Thu, 02 Oct 2008 09:17:58 +0100 Date: Thu, 2 Oct 2008 09:17:58 +0100 From: Stephane Chazelas To: zsh-workers@sunsite.dk Subject: Re: Pasting of long lines to ZLE is buggy under Mac OS X Message-ID: <20081002081758.GA5772@sc.homeunix.net> Mail-Followup-To: zsh-workers@sunsite.dk References: <20081002065525.GR24822@prunille.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20081002065525.GR24822@prunille.vinc17.org> User-Agent: Mutt/1.5.16 (2007-09-19) X-Virus-Scanned: ClamAV 0.92.1/8370/Thu Oct 2 05:51:47 2008 on bifrost X-Virus-Status: Clean On Thu, Oct 02, 2008 at 08:55:25AM +0200, Vincent Lefevre wrote: > It seems that zsh 4.3.6 suffers from a buffering problem when pasting > long lines under Mac OS X (at least 10.4.11). Other software, such as > bash and emacs (running in a terminal), does not seem to have such a > problem. [...] You may want to try "strace" or "truss" or the equivalent on your system. Here (4.3.6-dev-0+0925), it seems zsh reads one character at a time, and for every character, surprisingly, it does: read(10, "."..., 1) = 1 fcntl64(0, F_DUPFD, 10) = 11 close(0) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0 dup2(11, 0) = 0 close(11) = 0 write(10, "."..., 1.) = 1 It doesn't do that on another machine with 4.3.6-dev-0+0925 (debian x86 as well) where it just does: read(10, "f"..., 1) = 1 write(10, "f"..., 1f) = 1 But if zsh reads one character at a time, it's difficult to explain how big copy pastes cause problems. -- Stéphane