From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6486 invoked from network); 1 Jul 2004 18:16:26 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 1 Jul 2004 18:16:26 -0000 Received: (qmail 8181 invoked from network); 1 Jul 2004 19:28:03 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Jul 2004 19:28:03 -0000 Received: (qmail 29756 invoked by alias); 1 Jul 2004 18:15:41 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7653 Received: (qmail 29746 invoked from network); 1 Jul 2004 18:15:40 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 1 Jul 2004 18:15:40 -0000 Received: (qmail 7433 invoked from network); 1 Jul 2004 19:27:45 -0000 Received: from vinc17.net1.nerim.net (HELO ay.vinc17.org) (62.4.18.82) by a.mx.sunsite.dk with SMTP; 1 Jul 2004 19:27:31 -0000 Received: from lefevre by ay.vinc17.org with local (Exim 4.32) id 1Bg65L-0007Dz-65; Thu, 01 Jul 2004 20:14:59 +0200 Date: Thu, 1 Jul 2004 20:14:59 +0200 From: Vincent Lefevre To: zsh-users@sunsite.dk Subject: Re: coloring STDERR to terminal Message-ID: <20040701181459.GF2033@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: 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 09:56:37 -0700, Bart Schaefer wrote: > On Wed, 30 Jun 2004, Vincent Lefevre wrote: > > And is it possible to hide the coprocess from the jobs table? > > Older versions of zsh did that -- the coprocess was not managed as a job > at all, in fact -- but it was changed because (with the old behavior) > there was no clean way to send termination signals etc. to the coprocess. > > So at present, no, it's not possible to hide the coprocess. Couldn't the coprocess be marked in a special way, to send termination signals, etc.? > > 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). > > At this point the "read -p" in precmd() will block, because the coproc > has not yet executed "print -n $'\0'". So your step (4) won't happen: > > > 4) The new prompt is displayed (sent to the tty). I don't understand why it will block. The line you gave was: while read -t -p -k 1; do :; done and the zshbuiltins(1) man page says: -t [ num ] Test if input is available before attempting to read. If num is present, it must begin with a digit and will be evaluated to give a number of seconds, which may be a floating point number; in this case the read times out if input is not available within this time. If num is not present, it is taken to be zero, so that read returns immediately if no input is available. If no input is available, return status 1 and do not set any variables. -- 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