From b69009e8672270dc690584a641d74f518b5af6fa Mon Sep 17 00:00:00 2001 From: Shishir Mahajan Date: Mon, 24 Aug 2020 12:29:38 -0700 Subject: [PATCH] Fix review comments. --- driver.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/driver.go b/driver.go index 9f7778f4..deafbde7 100644 --- a/driver.go +++ b/driver.go @@ -20,7 +20,6 @@ import ( "context" "fmt" "github.com/hashicorp/consul-template/signals" - "os" "os/user" "path/filepath" "strings" @@ -678,12 +677,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) }