zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-users@sunsite.dk
Subject: Re: Background jobs and notification (stdout vs stderr)
Date: Fri, 02 Jul 2004 14:16:33 +0100	[thread overview]
Message-ID: <200407021316.i62DGYJa019602@news01.csr.com> (raw)
In-Reply-To: "Vincent Lefevre"'s message of "Fri, 02 Jul 2004 14:47:10 +0200." <20040702124710.GT2033@ay.vinc17.org>

Vincent Lefevre wrote:
> Let's consider:
> 
> greux:~> sleep 2&
> [1] 20823
> greux:~>
> [1]  + done       sleep 2
> greux:~>
> 
> The "[1] 20823" line is sent to stderr, whereas the "[1]  + done ..."
> line is sent to stdout (I could see that with the coloring of stderr).
> Is there any reason?

Asynchronous notifications are currently set up to go direct to the
terminal.  It's actually the duplicated fd used for terminal handling
rather than stdout, but they're typically the same unless you try to
redirect stdout.

I think this is probably because you don't usually want asynchronous job
notifications mixed in with other error text, since they're nothing to
do with what's actually running: job control is specifically interactive.
Note that the interaction with the terminal output is inevitable, that's
why you get the editing buffer cleard and the prompt reprinted
afterwards.  I don't think you can redirect them without messing up
terminal editing.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


  reply	other threads:[~2004-07-02 13:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-02 12:47 Vincent Lefevre
2004-07-02 13:16 ` Peter Stephenson [this message]
2004-07-02 13:41   ` 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=200407021316.i62DGYJa019602@news01.csr.com \
    --to=pws@csr.com \
    --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).