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

Function send_ctrl_c

test/utils.py:313–322  ·  view source on GitHub ↗

Create a process that sends a Ctrl-C like signal to the current process after `wait_seconds` seconds. Returns the `multiprocessing.Process` created.

(wait_seconds)

Source from the content-addressed store, hash-verified

311
312
313def send_ctrl_c(wait_seconds):
314 """Create a process that sends a Ctrl-C like signal to the current process
315 after `wait_seconds` seconds.
316
317 Returns the `multiprocessing.Process` created.
318
319 """
320 ctrl_c_process = multiprocessing.Process(target=send_ctrl_c_to_pid, args=(os.getpid(), wait_seconds))
321 ctrl_c_process.start()
322 return ctrl_c_process

Callers 1

test_watch_query_fullFunction · 0.90

Calls 1

startMethod · 0.45

Tested by 1

test_watch_query_fullFunction · 0.72