Monitoring a process

In the previous example, we discussed killing an application using the kill() function. You might have noticed that we made use of something called the try/except keywords to attempt killing the application. We will discuss these keywords in detail in the next chapter.

It is also possible to monitor whether an application is running using the kill() function using the try/except keywords. We will discuss monitoring processes using the kill() function after introducing the concept of trapping exceptions using try/except keywords.

All examples discussed in the os module are available for download along with this chapter as os_utils.py.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset