zsh-users
 help / color / mirror / code / Atom feed
From: Gregory Margo <gmargo@pacbell.net>
To: Bart Schaefer <schaefer@candle.brasslantern.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Functions that start Jobs
Date: Fri, 29 Jun 2001 01:04:12 -0700	[thread overview]
Message-ID: <20010629010412.A1776@yahoo.com> (raw)
In-Reply-To: <010628170738.ZM8419@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Thu, Jun 28, 2001 at 05:07:38PM -0700

On Thu, Jun 28, 2001 at 05:07:38PM -0700, Bart Schaefer wrote:
> On Jun 28,  3:33pm, Gregory Margo wrote:
> > Subject: Functions that start Jobs
> > I have a Function that starts a process in the background.
> > The Job created is "%2" instead of "%1".
> > Why is this?
> 
> Because the function itself is job %1.  It doesn't show up in the output
> of "jobs" because it's being executed within the current shell process,
> but it still has a job table entry.
> 
> > How can I make it be the first Job?
> 
> You can't.  Even if the function didn't use up one job slot, what if
> there were some other background job already running?
> 
> Why is it important that it be the first job?

Consistancy.  I've used this alias and others, with job control under
several shells, for many years.

If I type it on the command line, it's job %1.
If I make it a zsh alias, without the $*, then it's job %1.
When I used csh/tcsh, my alias created job %1.
When I used bash, my function (same as zsh function) created job %1.

In general, when I put something in the background (nothing else already
there) then I expect it to be job %1.

Why does a function take up a job slot?
And if it does, why doesn't 'exec' work?

thanks,
gm
-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Gregory H. Margo
Home: gmargo@yahoo.com
Work: gmargo@spam-spam-spam-bacon-and-spam.com


  reply	other threads:[~2001-06-29  8:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-28 22:33 Gregory Margo
2001-06-29  0:07 ` Bart Schaefer
2001-06-29  8:04   ` Gregory Margo [this message]
2001-06-29  8:26     ` Sven Wischnowsky
2001-06-29  9:04       ` Vincent Lefevre
2001-06-29  9:16         ` Sven Wischnowsky
2001-06-29 16:34           ` Bart Schaefer
2001-06-29  8:30     ` Bart Schaefer

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=20010629010412.A1776@yahoo.com \
    --to=gmargo@pacbell.net \
    --cc=gmargo@yahoo.com \
    --cc=schaefer@candle.brasslantern.com \
    --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).