func (task *Task) Kill() {
	if task.Config.CmdString != "" && task.Started && !task.Completed {
		syscall.Kill(-task.Command.Cmd.Process.Pid, syscall.SIGKILL)
	}
	for _, subTask := range task.Children {
		if subTask.Config.CmdString != "" && subTask.Started && !subTask.Completed {
			syscall.Kill(-subTask.Command.Cmd.Process.Pid, syscall.SIGKILL)
		}
	}
}
Kill will stop any running command (including child Tasks) with a -9 signal
package runtime
import (
	"bufio"
	"fmt"
	"io"
	"io/ioutil"
	"math"
	"os/exec"
	"strings"
	"sync"
	"syscall"
	"time"
	"github.com/google/uuid"
	"github.com/lunixbochs/vtclean"
	"github.com/wagoodman/bashful/pkg/config"
	"github.com/wagoodman/bashful/utils"
	"github.com/wayneashleyberry/terminal-dimensions"
)
var (
	sudoPassword string
	exitSignaled bool
)
const (
	StatusRunning TaskStatus = iota
	StatusPending
	StatusSuccess
	StatusError
)
func NewTask(taskConfig config.TaskConfig, runtimeOptions *config.Options) *Task {
	task := Task{
		Id:      uuid.New(),
		Config:  taskConfig,
		Options: runtimeOptions,
	}
	task.Command = newCommand(task.Config)
	task.events = make(chan TaskEvent)
	task.Status = StatusPending
	for subIndex := range taskConfig.ParallelTasks {
		subTaskConfig := &taskConfig.ParallelTasks[subIndex]
		subTask := NewTask(*subTaskConfig, runtimeOptions)
		task.Children = append(task.Children, subTask)
	}
	return &task
}
func (task *Task) UpdateExec(execpath string) {
	if task.Config.CmdString == "" {
		task.Config.CmdString = task.Options.ExecReplaceString
	}
	task.Config.CmdString = strings.Replace(task.Config.CmdString, task.Options.ExecReplaceString, execpath, -1)
	task.Config.URL = strings.Replace(task.Config.URL, task.Options.ExecReplaceString, execpath, -1)
	task.Command = newCommand(task.Config)
}