zsh-workers
 help / color / mirror / code / Atom feed
From: P.Stephenson@swansea.ac.uk
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Autoresume bug
Date: Fri, 07 Jul 95 15:32:42 +0100	[thread overview]
Message-ID: <23106.9507071432@pyro.swan.ac.uk> (raw)

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 <P.Stephenson@swansea.ac.uk>  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.


                 reply	other threads:[~1995-07-07 14:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=23106.9507071432@pyro.swan.ac.uk \
    --to=p.stephenson@swansea.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /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).