Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Parallel backupping embedded systems...how?



On Tue, 9 Dec 2014 20:31:14 +0000
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> zmodload zsh/parameter
> process1 &
> process2 &
> TRAPCHLD() {
>    if (( ${#jobstates} == 0 && jobs_started )); then
>      print Last background job edited, doing something else...
>      trap -- CHLD
>    fi
> }

Sorry, remove "&& jobs_started".

This implies you're in an interactive shell with job control --- it'll
work in a function but not a script unless you "setopt monitor".

pws



Messages sorted by: Reverse Date, Date, Thread, Author