Skip to content

Commit 94bca7f

Browse files
fix: PostgresNode::kill uses self._os_ops.get_platform() instead os.name (#365)
1 parent 86cfeb8 commit 94bca7f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/node.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from __future__ import annotations
33

44
import logging
5-
import os
65
import signal
76
import subprocess
87

@@ -1215,7 +1214,10 @@ def kill(self, someone=None):
12151214

12161215
assert x.node_status == NodeStatus.Running
12171216
assert type(x.pid) is int
1218-
sig = signal.SIGKILL if os.name != 'nt' else signal.SIGBREAK
1217+
if self._os_ops.get_platform() == "win32":
1218+
sig = 21 # signal.SIGBREAK
1219+
else:
1220+
sig = signal.SIGKILL
12191221
if someone is None:
12201222
self._os_ops.kill(x.pid, sig)
12211223
self._manually_started_pm_pid = None

0 commit comments

Comments
 (0)