MCPcopy Create free account
hub / github.com/pexpect/pexpect / kill

Method kill

pexpect/pty_spawn.py:715–723  ·  view source on GitHub ↗

This sends the given signal to the child application. In keeping with UNIX tradition it has a misleading name. It does not necessarily kill the child unless you send the right signal.

(self, sig)

Source from the content-addressed store, hash-verified

713 return alive
714
715 def kill(self, sig):
716
717 '''This sends the given signal to the child application. In keeping
718 with UNIX tradition it has a misleading name. It does not necessarily
719 kill the child unless you send the right signal. '''
720
721 # Same as os.kill, but the pid is given for you.
722 if self.isalive():
723 os.kill(self.pid, sig)
724
725 def getwinsize(self):
726 '''This returns the terminal window size of the child tty. The return

Callers 15

terminateMethod · 0.95
repl_run_command_asyncFunction · 0.45
run_commandMethod · 0.45
repl_run_command_asyncFunction · 0.45
test_destructorMethod · 0.45
getProcessResultsFunction · 0.45
test_sighupMethod · 0.45
tearDownMethod · 0.45
test_interruptMethod · 0.45

Calls 1

isaliveMethod · 0.95

Tested by 8

test_destructorMethod · 0.36
getProcessResultsFunction · 0.36
test_sighupMethod · 0.36
tearDownMethod · 0.36
test_interruptMethod · 0.36