MCPcopy Create free account
hub / github.com/dbcli/mycli / send_ctrl_c_to_pid

Function send_ctrl_c_to_pid

test/utils.py:302–310  ·  view source on GitHub ↗

Sends a Ctrl-C like signal to the given `pid` after `wait_seconds` seconds.

(pid, wait_seconds)

Source from the content-addressed store, hash-verified

300
301
302def send_ctrl_c_to_pid(pid, wait_seconds):
303 """Sends a Ctrl-C like signal to the given `pid` after `wait_seconds`
304 seconds."""
305 time.sleep(wait_seconds)
306 system_name = platform.system()
307 if system_name == "Windows":
308 os.kill(pid, signal.CTRL_C_EVENT)
309 else:
310 os.kill(pid, signal.SIGINT)
311
312
313def send_ctrl_c(wait_seconds):

Callers

nothing calls this directly

Calls 1

killMethod · 0.80

Tested by

no test coverage detected