Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `jobs | wc -l' => 0 ... bug?
- X-seq: zsh-workers 13782
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: `jobs | wc -l' => 0 ... bug?
- Date: Mon, 26 Mar 2001 17:04:07 +0000
- In-reply-to: Your message of "Mon, 26 Mar 2001 16:48:37 GMT." <1010326164837.ZM13050@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
> On Mar 26, 3:29pm, Peter Stephenson wrote:
> } Subject: Re: `jobs | wc -l' => 0 ... bug?
> }
> } > $ jobs | wc -l
> } > 0
> }
> } jobs here runs in a subshell, where there is no job control, so no
> } information on jobs. It has always been this way. It's not particularly
> } convenient, however. Maybe it's time someone thought about changing it.
>
> What do you suggest, that we special-case the "jobs" command?
Clearing the job table is handled specially in entersubsh().
if (cl)
clearjobtab();
MONITOR gets unset at this point, too. It shouldn't be necessary to do
both, and it should be possible to hack bin_fg() so that it can still list
jobs even if it can't control them. In fact, it looks like this is half
there: `fg' and `bg' test for !jobbing and complain, whereas `jobs'
doesn't and silently scans the empty job list. So maybe not clearing the
job table and relying on the option setting just works. But it needs a
proper work through to make sure.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author