From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 813 invoked from network); 30 Jun 2004 12:02:42 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 30 Jun 2004 12:02:42 -0000 Received: (qmail 11084 invoked from network); 30 Jun 2004 13:13:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Jun 2004 13:13:16 -0000 Received: (qmail 10306 invoked by alias); 30 Jun 2004 12:01:46 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7629 Received: (qmail 10296 invoked from network); 30 Jun 2004 12:01:45 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 30 Jun 2004 12:01:45 -0000 Received: (qmail 10020 invoked from network); 30 Jun 2004 13:12:52 -0000 Received: from vinc17.net1.nerim.net (HELO ay.vinc17.org) (62.4.18.82) by a.mx.sunsite.dk with SMTP; 30 Jun 2004 13:12:45 -0000 Received: from lefevre by ay.vinc17.org with local (Exim 4.32) id 1Bfdlv-0003Qx-5O; Wed, 30 Jun 2004 14:01:03 +0200 Date: Wed, 30 Jun 2004 14:01:03 +0200 From: Vincent Lefevre To: zsh-users@sunsite.dk Subject: Re: coloring STDERR to terminal Message-ID: <20040630120103.GS2033@ay.vinc17.org> Mail-Followup-To: zsh-users@sunsite.dk References: <20040627190433.Q27888@willy_wonka> <20040629160826.GL2033@ay.vinc17.org> <20040630070902.GO2033@ay.vinc17.org> <20040630114341.GR2033@ay.vinc17.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040630114341.GR2033@ay.vinc17.org> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.6i Sender: Vincent Lefevre X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On 2004-06-30 13:43:41 +0200, Vincent Lefevre wrote: > Thanks for the explanation. But in fact, I didn't add the > > print -n $'\0' > > line, so there is no R problem in my case. So, is this line really > useful? Hmm... I now see. It seems I got confused by the zshbuiltins man page, which says: -p Input is read from the coprocess. Is it 1) from the coprocess output, or 2) sharing the coprocess input? First I supposed (2); I think that this is really what I want. But looking at the explanations, it seems to be (1); however, in this case, there seems to be a race condition anyway, as the coprocess may be too late to write its input to the tty, i.e. the following is possible, isn't it? 1) I type Ctrl-d. 2) "zsh: you have running jobs." is written by zsh to stderr (will be read by the coprocess). 3) precmd() is called (but there are still no bytes sent by the coprocess). 4) The new prompt is displayed (sent to the tty). 5) The coprocess reads a line. 6) The coprocess sends "zsh: you have running jobs." to the tty. 7) The coprocess sends a byte to stdout (too late!). -- Vincent Lefèvre - Web: 100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17, Championnat International des Jeux Mathématiques et Logiques, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA