diff options
author | Valery Piashchynski <[email protected]> | 2019-11-17 15:32:26 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2019-11-17 15:32:26 +0300 |
commit | 492faef8e51fce243216758baa8c16b4173603df (patch) | |
tree | da6376fba9a9af3358017dcbd5034677192f407b /worker.go | |
parent | b81f2b121eb3a49372662d0bc9c19c53366f33fc (diff) |
complete half
Diffstat (limited to 'worker.go')
-rw-r--r-- | worker.go | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -105,7 +105,10 @@ func (w *Worker) Wait() error { if runtime.GOOS != "windows" { // windows handles processes and close pipes differently, // we can ignore wait here as process.Wait() already being handled above - w.cmd.Wait() + err := w.cmd.Wait() + if err != nil { + return err + } } if w.endState.Success() { @@ -214,10 +217,16 @@ func (w *Worker) start() error { defer w.mu.Unlock() if w.rl != nil { - w.rl.Close() + err := w.rl.Close() + if err != nil { + w.err.lsn(EventWorkerError, WorkerError{Worker: w, Caused: err}) + } } - w.err.Close() + err := w.err.Close() + if err != nil { + w.err.lsn(EventWorkerError, WorkerError{Worker: w, Caused: err}) + } } }() |