zsh-users
 help / color / mirror / code / Atom feed
* Background jobs and notification (stdout vs stderr)
@ 2004-07-02 12:47 Vincent Lefevre
  2004-07-02 13:16 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 2004-07-02 12:47 UTC (permalink / raw)
  To: zsh-users

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?

-- 
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Background jobs and notification (stdout vs stderr)
  2004-07-02 12:47 Background jobs and notification (stdout vs stderr) Vincent Lefevre
@ 2004-07-02 13:16 ` Peter Stephenson
  2004-07-02 13:41   ` Vincent Lefevre
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2004-07-02 13:16 UTC (permalink / raw)
  To: zsh-users

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
**********************************************************************


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Background jobs and notification (stdout vs stderr)
  2004-07-02 13:16 ` Peter Stephenson
@ 2004-07-02 13:41   ` Vincent Lefevre
  0 siblings, 0 replies; 3+ messages in thread
From: Vincent Lefevre @ 2004-07-02 13:41 UTC (permalink / raw)
  To: zsh-users

On 2004-07-02 14:16:33 +0100, Peter Stephenson wrote:
> 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.

OK. I think that the zsh man pages should mention where all the data
output by zsh are sent (to stdout, stderr, the tty...).

-- 
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-02 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-02 12:47 Background jobs and notification (stdout vs stderr) Vincent Lefevre
2004-07-02 13:16 ` Peter Stephenson
2004-07-02 13:41   ` Vincent Lefevre

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).