Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Functions that start Jobs



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?



Messages sorted by: Reverse Date, Date, Thread, Author