Skip to content

Commit

Permalink
Fix review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-a412ed committed Aug 24, 2020
1 parent e65c782 commit 7474374
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,12 +678,11 @@ func (d *Driver) SignalTask(taskID string, signal string) error {
// The given signal will be forwarded to the target taskID.
// Please checkout https://github.com/hashicorp/consul-template/blob/master/signals/signals_unix.go
// for a list of supported signals.
sig := os.Interrupt
if s, ok := signals.SignalLookup[signal]; ok {
sig = s
} else {
d.logger.Warn("unknown signal to send to task, using SIGINT instead", "signal", signal, "task_id", handle.taskConfig.ID)
sig, ok := signals.SignalLookup[signal]
if !ok {
return fmt.Errorf("Error in looking up signal: %s", signal)
}

return d.podmanClient.SignalContainer(handle.containerID, sig)
}

Expand Down

0 comments on commit 7474374

Please sign in to comment.