File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ func Stop(ctx context.Context, name string) error {
143143 return err
144144 }
145145
146- if err := osutil .SysKill (pid , osutil .SigKill ); err != nil {
146+ if err := osutil .SysKill (pid , osutil .SigInt ); err != nil {
147147 logrus .Error (err )
148148 return fmt .Errorf ("failed to kill process with pid %d: %w" , pid , err )
149149 }
@@ -157,7 +157,10 @@ func Stop(ctx context.Context, name string) error {
157157 break
158158 }
159159 if time .Since (startWaiting ) > 5 * time .Second {
160- logrus .Infof ("usernet network still running after 5 seconds" )
160+ logrus .Infof ("usernet network still running after 5 seconds. Attempting to forcibly kill" )
161+ if err := osutil .SysKill (pid , osutil .SigKill ); err != nil {
162+ logrus .Error (err )
163+ }
161164 break
162165 }
163166 time .Sleep (500 * time .Millisecond )
You can’t perform that action at this time.
0 commit comments