Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Functions that start Jobs
- X-seq: zsh-users 3979
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Functions that start Jobs
- Date: Fri, 29 Jun 2001 11:04:06 +0200
- In-reply-to: <200106290826.KAA04489@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010629010412.A1776@xxxxxxxxx> <200106290826.KAA04489@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On 29 Jun, Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 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
I have 2 questions:
1) Is the function executed in the current shell? I don't understand
what happens exactly. What happens if Ctrl-Z is typed while a builtin
is being executed?
2) I tried this example (with 100 instead of 10, to have more time),
and after I typed fg, the sleep ends immediately (i.e., no time
passes). I have the same behaviour on two machines under Linux
(Linux/x86 and Linux/ppc). Is this normal?
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Messages sorted by:
Reverse Date,
Date,
Thread,
Author