From 48ec8ba3ba8b5ea1389768ea0b3a559404d76e6e Mon Sep 17 00:00:00 2001 From: Gourav kumar <44055698+gouravkrosx@users.noreply.github.com> Date: Tue, 2 Apr 2024 15:35:17 +0530 Subject: [PATCH] fix: lint issue (#1774) Signed-off-by: gouravkrosx --- pkg/core/app/app.go | 2 +- utils/utils.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/core/app/app.go b/pkg/core/app/app.go index 924398c61..d31ce0dcf 100644 --- a/pkg/core/app/app.go +++ b/pkg/core/app/app.go @@ -440,7 +440,7 @@ func (a *App) run(ctx context.Context) models.AppError { // Set the cancel function for the command cmd.Cancel = func() error { - return utils.InterruptProcessTree(cmd, a.logger, cmd.Process.Pid, syscall.SIGINT) + return utils.InterruptProcessTree(a.logger, cmd.Process.Pid, syscall.SIGINT) } // wait after sending the interrupt signal, before sending the kill signal cmd.WaitDelay = 10 * time.Second diff --git a/utils/utils.go b/utils/utils.go index e1907c674..86df8dc79 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -478,7 +478,7 @@ func RunInDocker(ctx context.Context, logger *zap.Logger) error { ) cmd.Cancel = func() error { - return InterruptProcessTree(cmd, logger, cmd.Process.Pid, syscall.SIGINT) + return InterruptProcessTree(logger, cmd.Process.Pid, syscall.SIGINT) } cmd.Stdout = os.Stdout @@ -533,7 +533,7 @@ func SentryInit(logger *zap.Logger, dsn string) { //} // InterruptProcessTree interrupts an entire process tree using the given signal -func InterruptProcessTree(cmd *exec.Cmd, logger *zap.Logger, ppid int, sig syscall.Signal) error { +func InterruptProcessTree(logger *zap.Logger, ppid int, sig syscall.Signal) error { // Find all descendant PIDs of the given PID & then signal them. // Any shell doesn't signal its children when it receives a signal. // Children may have their own process groups, so we need to signal them separately.