From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10454 invoked from network); 2 Jul 2004 13:18:14 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 2 Jul 2004 13:18:14 -0000 Received: (qmail 23598 invoked from network); 2 Jul 2004 14:30:20 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Jul 2004 14:30:20 -0000 Received: (qmail 20048 invoked by alias); 2 Jul 2004 13:17:17 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7660 Received: (qmail 20038 invoked from network); 2 Jul 2004 13:17:16 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 2 Jul 2004 13:17:16 -0000 Received: (qmail 22598 invoked from network); 2 Jul 2004 14:29:53 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 2 Jul 2004 14:29:40 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i62DGav27687 for ; Fri, 2 Jul 2004 13:16:36 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 2 Jul 2004 14:15:56 +0100 Received: from news01.csr.com ([192.168.143.38]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 2 Jul 2004 14:17:20 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.12.11/8.12.11) with ESMTP id i62DGZu2019605 for ; Fri, 2 Jul 2004 14:16:35 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.12.11/8.12.11/Submit) with ESMTP id i62DGYJa019602 for ; Fri, 2 Jul 2004 14:16:35 +0100 Message-Id: <200407021316.i62DGYJa019602@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-users@sunsite.dk Subject: Re: Background jobs and notification (stdout vs stderr) In-reply-to: "Vincent Lefevre"'s message of "Fri, 02 Jul 2004 14:47:10 +0200." <20040702124710.GT2033@ay.vinc17.org> Date: Fri, 02 Jul 2004 14:16:33 +0100 From: Peter Stephenson X-OriginalArrivalTime: 02 Jul 2004 13:17:20.0962 (UTC) FILETIME=[E7F9BA20:01C46036] X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: ****** X-Spam-Status: Yes, hits=6.0 required=6.0 tests=BAYES_99 autolearn=no version=2.63 X-Spam-Hits: 6.0 X-Spam-Report: * 6.0 BAYES_99 BODY: Bayesian spam probability is 99 to 100% * [score: 0.9976] 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 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 **********************************************************************