We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 744cead commit 6d41640Copy full SHA for 6d41640
tests/python/tests.py
@@ -18,9 +18,14 @@ def pgcat_start():
18
19
20
def pg_cat_send_signal(signal: signal.Signals):
21
- for proc in psutil.process_iter(["pid", "name"]):
22
- if "pgcat" == proc.name():
23
- os.kill(proc.pid, signal)
+ try:
+ for proc in psutil.process_iter(["pid", "name"]):
+ if "pgcat" == proc.name():
24
+ os.kill(proc.pid, signal)
25
+ except Exception as e:
26
+ # The process can be gone when we send this signal
27
+ print(e)
28
+
29
if signal == signal.SIGTERM:
30
# Returns 0 if pgcat process exists
31
time.sleep(2)
0 commit comments