* job control in scripts
@ 2017-08-17 15:54 apfelsinenhain
0 siblings, 0 replies; only message in thread
From: apfelsinenhain @ 2017-08-17 15:54 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 605 bytes --]
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-17 16:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 15:54 job control in scripts apfelsinenhain
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).