zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-users@sunsite.dk
Subject: Re: coloring STDERR to terminal
Date: Thu, 1 Jul 2004 20:14:59 +0200	[thread overview]
Message-ID: <20040701181459.GF2033@ay.vinc17.org> (raw)
In-Reply-To: <Pine.LNX.4.60.0406300906100.5600@toltec.zanshin.com>

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 <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
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


  reply	other threads:[~2004-07-01 18:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-27 23:22 Atom 'Smasher'
2004-06-28  0:06 ` ari
2004-06-28  0:36   ` Atom 'Smasher'
2004-06-29 15:43 ` Bart Schaefer
2004-06-29 16:08   ` Vincent Lefevre
2004-06-29 17:14     ` Bart Schaefer
2004-06-30  7:09       ` Vincent Lefevre
2004-06-30 10:52         ` Bart Schaefer
2004-06-30 11:43           ` Vincent Lefevre
2004-06-30 12:01             ` Vincent Lefevre
2004-06-30 16:56             ` Bart Schaefer
2004-07-01 18:14               ` Vincent Lefevre [this message]
2004-07-02  0:11                 ` Bart Schaefer
2004-07-02 12:42                   ` Vincent Lefevre
2004-07-02 21:32                     ` Bart Schaefer
2004-07-20  9:10                     ` Atom 'Smasher'
2004-07-20 16:10                       ` Bart Schaefer
2004-07-20 19:27                         ` Atom 'Smasher'
2004-07-20 21:15                           ` Bart Schaefer
2004-07-20 23:30                             ` Wayne Davison
2004-07-21  3:15                               ` Bart Schaefer
2004-07-21  6:23                                 ` Wayne Davison
2004-07-21  7:30                                   ` Bart Schaefer
2004-07-21 13:19                                   ` Vincent Lefevre
2004-07-30 11:50                     ` Andy Spiegl
2004-07-30 23:44                       ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040701181459.GF2033@ay.vinc17.org \
    --to=vincent@vinc17.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).