Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Functions that start Jobs
- X-seq: zsh-users 3977
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Functions that start Jobs
- Date: Fri, 29 Jun 2001 10:26:02 +0200 (MET DST)
- In-reply-to: <20010629010412.A1776@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Gregory Margo wrote:
> ...
>
> Why does a function take up a job slot?
> And if it does, why doesn't 'exec' work?
Because no other shell can do this:
% f() { sleep 10; echo foo }
% f
^Z
zsh: 4022 suspended f
% fg
[1] + continued f
[ time passes... ]
foo
Note that it reported that it had stopped the job `f' and that the `foo'
was printed after the `sleep' finished.
With bash:
$ f() { sleep 10; echo foo; }
$ f
^Z
[1]+ Stopped sleep 10
foo
$
Ick!
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author