zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Bogus "no such job" (Re: Preliminary release of 3.0.8 - please test)
Date: Wed, 8 Mar 2000 07:30:38 +0000	[thread overview]
Message-ID: <1000308073038.ZM8573@candle.brasslantern.com> (raw)
In-Reply-To: <slrn8buads.pqj.mason@coral.primenet.com.au>

On Mar 3,  2:55am, Geoff Wing wrote:
} Subject: Re: Preliminary release of 3.0.8 - please test
}
} Bart Schaefer <schaefer@candle.brasslantern.com> typed:
} :On Feb 29, 10:33am, Geoff Wing wrote:
} :} Subject: Re: Preliminary release of 3.0.8 - please test
} :} After some initial usage, got it into a state of:
} :} % %
} :} fg: no such job: 3
} :} % %%
} :} fg: no such job: 3
} :} % fg
} :} fg: no current job
} :} % jobs
} :} %
} :Hrm.  The job handling code is now identical to 3.1.6-dev-19, so if you
} :can get 3.0.8 into that state theres a problem for 3.1.6 as well.
} 
} I'm thinking that getjob() may need a setcurjob() before it checks curjob.

Since Sven has been incommunicado for a couple of days, I tried to look
into this myself in more detail.  The only two places where getjob() is
called are from bin_kill(), and from bin_fg() *after* the setcurjob()
that you noted.

I can believe that a race condition might cause "no such job: 3" once,
but twice in a row is impossible.  So the only possible answer is that
the one and only job has STAT_NOPRINT set but *not* STAT_SUBJOB, which
in turn happens only at exec.c:768 and 806 (in 3.0.8; in 3.1.6-dev-19,
exec.c:993 and 1031), both in execpline().  See jobs.c:setprevjob(),
which is called from setcurjob().

Now, it may be that the right solution is to have setprevjob() ignore
jobs that have STAT_NOPRINT set, but I wouldn't want that to mask some
more serious job-state problem.  If you have any insights, share 'em.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~2000-03-08  7:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-28  0:21 Preliminary release of 3.0.8 - please test Bart Schaefer
2000-02-28  2:16 ` Geoff Wing
2000-02-29 10:33   ` Geoff Wing
2000-02-29 16:18     ` Bart Schaefer
2000-03-03  2:55       ` Geoff Wing
2000-03-08  7:30         ` Bart Schaefer [this message]
2000-02-28 14:49 ` Jos Backus
2000-03-20 18:36 ` Brian Boonstra
2000-03-09 12:01 Bogus "no such job" (Re: Preliminary release of 3.0.8 - please test) Sven Wischnowsky
2000-03-10  9:33 Sven Wischnowsky
2000-03-10 10:52 ` Geoff Wing

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=1000308073038.ZM8573@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).