From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5802 invoked from network); 2 Jul 1999 06:32:49 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jul 1999 06:32:49 -0000 Received: (qmail 20344 invoked by alias); 2 Jul 1999 06:32:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6941 Received: (qmail 20337 invoked from network); 2 Jul 1999 06:32:36 -0000 Date: Fri, 2 Jul 1999 08:32:35 +0200 (MET DST) Message-Id: <199907020632.IAA14650@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: mason@primenet.com.au's message of 2 Jul 1999 02:05:17 GMT Subject: Re: BUG: zsh-3.1.5-pws-24: time is dead mason@primenet.com.au wrote: > Sven Wischnowsky typed: > :mason@primenet.com.au wrote: > :> % time =echo foobar > :> foobar > :This patch seems to work, but since I don't know why it worked before, > :I'm not really happy with it. > > I'm not happy with it either. It works, but it looks like a hack. > Comment from zsh.h: > #define STAT_NOPRINT (1<<5) /* job was killed internally, */ > /* we don't want to show that */ > Is STAT_NOPRINT being used for other purposes now? Are we getting the wrong > status for jobs while trying to work around all these other programs which > want certain pgrp/session requirements? Yes. I knew about this, I only couldn't find the place where NOPRINT was set where it hadn't been set before immediatly. But now I found it. This goes on top of 6936, in the hope that this is more convenient for you. Bye Sven diff -u os/exec.c Src/exec.c --- os/exec.c Wed Jun 30 11:56:49 1999 +++ Src/exec.c Fri Jul 2 08:30:18 1999 @@ -890,7 +890,7 @@ lastwj = thisjob = newjob; - if (list_pipe || pline_level) + if (list_pipe || (pline_level && !(how & Z_TIMED))) jn->stat |= STAT_NOPRINT; if (nowait) { diff -u os/jobs.c Src/jobs.c --- os/jobs.c Thu Jul 1 08:50:47 1999 +++ Src/jobs.c Fri Jul 2 08:28:42 1999 @@ -494,14 +494,9 @@ int conted = 0, lineleng = columns, skip = 0, doputnl = 0; FILE *fout = (synch == 2) ? stdout : shout; - if (jn->stat & STAT_NOPRINT) { - if ((jn->stat & (STAT_TIMED | STAT_DONE)) == (STAT_TIMED | STAT_DONE) && - should_report_time(jn)) { - jn->stat &= ~STAT_TIMED; - dumptime(jn); - } + if (jn->stat & STAT_NOPRINT) return; - } + if (lng < 0) { conted = 1; lng = 0; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de