zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: "Björn Johannesson" <d00bjojo@dtek.chalmers.se>
Cc: zsh-users@sunsite.dk
Subject: Re: zsh: Strange feature with 'jobs' commmand
Date: Thu, 30 May 2002 13:16:22 +0100	[thread overview]
Message-ID: <E17DOqs-0001J4-00@bimbo.logica.co.uk> (raw)
In-Reply-To: <20020530135450.A16761@licia.dtek.chalmers.se>

On 30 May, you wrote:
> 
> If you start a few jobs in the background and do:
> zsh% jobs
> [1]  - running    xmixer
> [2]  + running    gtcd
> zsh% _
> 
> ok, this is expected but this is not...
> zsh% jobs | less
> (END)
> zsh% _
> 
> Why? This is quite annoying. You do not get any output if you pipe the
> results from the "jobs" command. (jobs 2>&1|less doesn't work either)

What is happening is that jobs is being run in a subshell. The subshell
doesn't inherit the child processes (i.e. the jobs) so when jobs runs it
doesn't find any to list.

We could do with a mention of this in the FAQ (unless it is there
already and my quick grep missed it).

Incidentally, I think bash special cases the jobs builtin and would
run less in a subshell in this case instead. Could we do something like
this in zsh?

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


  reply	other threads:[~2002-05-30 12:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-30 11:54 Björn Johannesson
2002-05-30 12:16 ` Oliver Kiddle [this message]
2002-05-30 12:37   ` Borsenkow Andrej
2002-05-30 15:36     ` Phil Pennock
2002-05-30 12:33 ` $jobstates (Re: zsh: Strange feature with 'jobs' commmand) Thomas Köhler
2002-05-30 12:48   ` Sven Wischnowsky
2002-05-30 13:25     ` Thomas Köhler

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=E17DOqs-0001J4-00@bimbo.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=d00bjojo@dtek.chalmers.se \
    --cc=zsh-users@sunsite.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).