Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
job control from script
- X-seq: zsh-users 9775
- From: rgo <rgo@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: job control from script
- Date: Sun, 11 Dec 2005 17:21:35 +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi all. I wrote a little script, but I cannot to learn him to kill all his childs on SIGINT.
#script:
#!/bin/zsh
setopt MONITOR
function TRAPINT () {
kill %
return (( $1+128 ))
}
if [[ $1 == "start" ]]; then
for (( i=0; i<$2; i++ )); do
$0 dowork
done
fi
# ... some long time stuff ...
#----end script
Why `kill %' doesn't work? And `kill %NUM'? And how can I fetch job list for use in script?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author