Skip to content

Commit

Permalink
improve child logging messages
Browse files Browse the repository at this point in the history
Removed 'died' terminology as it is non-standard terminology and is
just wrong when the child exits successfully.
  • Loading branch information
eikenb committed Sep 29, 2022
1 parent b722e29 commit 7d21c8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manager/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewErrChildDied(c int) *ErrChildDied {

// Error implements the error interface.
func (e *ErrChildDied) Error() string {
return fmt.Sprintf("child process died with exit code %d", e.code)
return fmt.Sprintf("child process exited with code %d", e.code)
}

// ExitStatus implements the ErrExitable interface.
Expand Down
6 changes: 3 additions & 3 deletions manager/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (r *Runner) Start() {
log.Printf("[INFO] (runner) waiting for child process to exit")
select {
case c := <-childExitCh:
log.Printf("[INFO] (runner) child process died")
log.Printf("[INFO] (runner) child process exited")
r.ErrCh <- NewErrChildDied(c)
return
case <-r.DoneCh:
Expand Down Expand Up @@ -348,7 +348,7 @@ func (r *Runner) Start() {
log.Printf("[INFO] (runner) waiting for child process to exit")
select {
case c := <-childExitCh:
log.Printf("[INFO] (runner) child process died")
log.Printf("[INFO] (runner) child process exited")
r.ErrCh <- NewErrChildDied(c)
return
case <-r.DoneCh:
Expand Down Expand Up @@ -410,7 +410,7 @@ func (r *Runner) Start() {
delete(r.quiescenceMap, tmpl.ID())

case c := <-childExitCh:
log.Printf("[INFO] (runner) child process died")
log.Printf("[INFO] (runner) child process exited")
r.ErrCh <- NewErrChildDied(c)
return

Expand Down

0 comments on commit 7d21c8a

Please sign in to comment.