I am doing a project in python in which I want to add a feature like it will kill a background process if it is not running in the foreground. Browsers like firefox and chrome often run in the background after you turn on your computer. I'm using psutil to find the process info and kill it. But in psutil I could not find a way to determine if the process is running in background or foreground. If there is any way to do it using psutil or anything else please let me know.
Asked
Active
Viewed 121 times