Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
job control in scripts
- X-seq: zsh-users 22835
- From: apfelsinenhain@xxxxxx
- To: zsh-users@xxxxxxx
- Subject: job control in scripts
- Date: Thu, 17 Aug 2017 17:54:48 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello
In a script I have something like:
```
#!/usr/bin/env zsh
set -m
sleep 5 &
echo a
fg
echo x
```
Now this seems to behave as expected in zsh 5.4.1 at first (echo a,
delay, echo x) ... but if I try to cancel the sleep command using CTRL-C
after it's been "brought back" using `fg` that does not work. Instead it
waits out the remaining time, and then cancels the script before
`echo`ing the "x".
Bash on the other hand behaves as expected - pressing CTRL-C after the
`fg` will interrupt the `sleep` (and also the rest of the script).
Is that intended behaviour? Is it configurable?
Thanks
Messages sorted by:
Reverse Date,
Date,
Thread,
Author