From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id AAA11564 for ; Sat, 8 Jul 1995 00:41:04 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA23434 (5.65c/Gatech-10.0-IDA for ); Fri, 7 Jul 1995 10:36:07 -0400 Received: by math (5.x/SMI-SVR4) id AA24504; Fri, 7 Jul 1995 10:32:38 -0400 Resent-Date: Fri, 07 Jul 95 15:32:42 +0100 Old-Return-Path: Message-Id: <23106.9507071432@pyro.swan.ac.uk> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Autoresume bug Date: Fri, 07 Jul 95 15:32:42 +0100 From: P.Stephenson@swansea.ac.uk X-Mts: smtp Resent-Message-Id: <"FPaw82.0.k-5.5MK_l"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/172 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I keep thinking I'm not going to make any more patches for a bit, then another bug crops up... With autoresume set, start a background job with `w', e.g. % while true; do sleep 60; done & [1] 20550 then try to execute the command w. It will resume the previous command. Arguably this is correct (though I'd much prefer autoresume to require an exact match on the first word and I'd like to hear other opinions). What's definitely wrong, though, is that `command w' (or `exec w' or `noglob w' ...) do an autoresume as well. This fixes that. Yes, the test is grotesque. *** Src/exec.c~ Tue Jul 4 12:16:28 1995 --- Src/exec.c Fri Jul 7 15:25:55 1995 *************** *** 1086,1092 **** bkg = 0; } if (isset(AUTORESUME) && !bkg && empty(cmd->redir) && full(args) && ! !input && type == SIMPLE && !nextnode(firstnode(args))) { if (unset(NOTIFY)) scanjobs(); if (findjobnam(peekfirst(args)) != -1) --- 1086,1093 ---- bkg = 0; } if (isset(AUTORESUME) && !bkg && empty(cmd->redir) && full(args) && ! !input && type == SIMPLE && !nextnode(firstnode(args)) && ! !cmd->flags) { if (unset(NOTIFY)) scanjobs(); if (findjobnam(peekfirst(args)) != -1) -- Peter Stephenson Tel: +44 1792 205678 extn. 4461 WWW: http://python.swan.ac.uk/~pypeters/ Fax: +44 1792 295324 Department of Physics, University of Wales, Swansea, Singleton Park, Swansea, SA2 8PP, U.K.