summaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2019-11-17 15:32:26 +0300
committerValery Piashchynski <[email protected]>2019-11-17 15:32:26 +0300
commit492faef8e51fce243216758baa8c16b4173603df (patch)
treeda6376fba9a9af3358017dcbd5034677192f407b /worker.go
parentb81f2b121eb3a49372662d0bc9c19c53366f33fc (diff)
complete half
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/worker.go b/worker.go
index a95a80b3..6be841a9 100644
--- a/worker.go
+++ b/worker.go
@@ -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})
+ }
}
}()