os.kill() Method Syntax in Python

Syntax: os.kill(pid, sig)

Parameters: 

  • pid: An integer value representing process id to which signal is to be sent. 
  • sig An integer representing signal number or the signal constant available on the host platform defined in the signal module to be sent.

Return type: This method does not return any value. 

Python | os.kill() method

os.kill() method in Python is used to send a specified signal to the process with a specified process ID. Constants for the specific signals available on the host platform are defined in the Signal Module.

Similar Reads

os.kill() Method Syntax in Python

Syntax: os.kill(pid, sig) Parameters:  pid: An integer value representing process id to which signal is to be sent.  sig An integer representing signal number or the signal constant available on the host platform defined in the signal module to be sent. Return type: This method does not return any value....

Python os.kill() Function Examples

Below are some examples by which we can perform the kill process Python in the OS module:...

Contact Us