|
|
|
|
|
|
|
|
this.child.kill("SIGKILL"); |
|
|
this.child.kill("SIGKILL"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.stopping = false; |
|
|
cb(); |
|
|
cb(); |
|
|
}, 1000); |
|
|
}, 1000); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
stop(cb) { |
|
|
stop(cb) { |
|
|
var next = async(this.procs.length, cb); |
|
|
|
|
|
|
|
|
this.stopping = true; |
|
|
|
|
|
var next = async(this.procs.length, () => { |
|
|
|
|
|
this.stopping = false; |
|
|
|
|
|
cb(); |
|
|
|
|
|
}); |
|
|
this.procs.forEach(p => p.stop(next)); |
|
|
this.procs.forEach(p => p.stop(next)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
"Invalid 'as' attribute:", |
|
|
"Invalid 'as' attribute:", |
|
|
proc.as); |
|
|
proc.as); |
|
|
} |
|
|
} |
|
|
p.start(); |
|
|
|
|
|
|
|
|
|
|
|
procs[proc.name] = p; |
|
|
procs[proc.name] = p; |
|
|
|
|
|
|
|
|
|
|
|
if (proc.delay != null) { |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
if (!p.stopping) |
|
|
|
|
|
p.start(); |
|
|
|
|
|
}, proc.delay); |
|
|
|
|
|
} else { |
|
|
|
|
|
p.start(); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|