how to kill a process

Richard Rossel henhiskan at gmail.com
Tue Jun 12 15:04:21 EDT 2007


On 12 jun, 13:24, "Evan Klitzke" <e... at yelp.com> wrote:
> On 6/12/07, Richard Rossel <henhis... at gmail.com> wrote:
>
> > But when the python code is called to kill the created process, the
> > process is left in a zombie state.
>
> If the process is left in a zombie state, it's because the parent
> process isn't calling wait(2). If the parent process is your own
> python script, you might try a call to os.wait after the kill
> statement.
>

The wait call did the trick, but now a sh from kill process
left in zombie state, so afterwards the waitpid, I added a code line
to call poll() method from the kill process, and doesn't generates
zombie
process anymore :)

Thanks for your helps





More information about the Python-list mailing list