killing a task started with popen()

Timothy Grant tjg at exceptionalminds.com
Mon Feb 12 23:57:46 EST 2001


Hi again.

I'm using the following code

x = os.popen('tail -fn1 /var/log/messages')

works beautifully.

however, x.close() doesn't work. I understand why, but I don't know
what to do about it. So, what method would be best to terminate the process
I started?

I guess I should just let it run until the parent exits, but that seems kind
of klunky.

-- 
Stand Fast,
    tjg.

Timothy Grant                         tjg at exceptionalminds.com
Red Hat Certified Engineer            www.exceptionalminds.com
Avalon Technology Group, Inc.                   (503) 246-3630
>>>>>>>>>>>>>Linux, because rebooting is *NOT* normal<<<<<<<<<
>>>>This machine was last rebooted:  27 days  9:02 hours ago<<




More information about the Python-list mailing list