Skip to content

Commit b3649dc

Browse files
committed
Rename standby force-kill helper for clarity
1 parent d34ad30 commit b3649dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/instances/standby.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,13 @@ func (m *manager) shutdownHypervisor(ctx context.Context, inst *Instance) error
263263
log.DebugContext(ctx, "hypervisor shutdown gracefully", "instance_id", inst.Id, "pid", pid)
264264
} else {
265265
log.WarnContext(ctx, "hypervisor did not exit gracefully in time, force killing process", "instance_id", inst.Id, "pid", pid)
266-
if err := forceKillHypervisorProcess(pid); err != nil {
266+
if err := forceKillHypervisorPID(pid); err != nil {
267267
return err
268268
}
269269
}
270270
} else {
271271
log.DebugContext(ctx, "skipping graceful exit wait; force killing hypervisor process", "instance_id", inst.Id, "pid", pid)
272-
if err := forceKillHypervisorProcess(pid); err != nil {
272+
if err := forceKillHypervisorPID(pid); err != nil {
273273
return err
274274
}
275275
}
@@ -282,7 +282,7 @@ func (m *manager) shutdownHypervisor(ctx context.Context, inst *Instance) error
282282
return nil
283283
}
284284

285-
func forceKillHypervisorProcess(pid int) error {
285+
func forceKillHypervisorPID(pid int) error {
286286
if err := syscall.Kill(pid, syscall.SIGKILL); err != nil {
287287
if err == syscall.ESRCH {
288288
return nil

0 commit comments

Comments
 (0)