File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 33package plugin
44
55import (
6+ "fmt"
67 "os/exec"
78 "syscall"
89
910 "github.com/massalabs/station/pkg/logger"
1011)
1112
12- // sendStopSignal sends an appropriate signal to gracefully stop a process on Unix systems
13+ // sendStopSignal sends an appropriate signal to gracefully stop a process on Unix systems.
1314func (p * Plugin ) sendStopSignal () error {
1415 err := p .command .Process .Signal (syscall .SIGTERM )
1516 if err != nil {
16- logger .Warnf ("Failed to send SIGTERM to plugin %s: %s\n " , p .ID , err )
17- return err
17+ return fmt .Errorf ("failed to send SIGTERM to plugin %s: %w" , p .ID , err )
1818 }
1919
2020 logger .Infof ("Sent SIGTERM to plugin %s.\n " , p .ID )
21+
2122 return nil
2223}
2324
24- // setupProcess configures platform-specific process attributes (no-op on Unix)
25- func setupProcess (cmd * exec.Cmd ) {
25+ // setupProcess configures platform-specific process attributes (no-op on Unix).
26+ func setupProcess (_ * exec.Cmd ) {
2627 // No special setup needed for Unix systems
2728}
You can’t perform that action at this time.
0 commit comments