ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: [Wireshark-users] Kill a process started via Popen command

From: Nicole Powell <mznikkip@xxxxxxxxxxx>
Date: Mon, 9 Nov 2009 09:25:20 -0500

I am trying to kill a process that was started via the Popen command:

s = sub.Popen( ['tshark -r ' + orig_file_name + ' -o column.format:"Info","%i"'], shell=True, stdout=sub.PIPE, stderr=sub.PIPE )

This process runs over a period of time. Is there a simple way to kill it? I tried using the "kill()" function but that requires knowledge of the pid of the process; Popen returns a file pointer but not the pid of the process that was started.



From the desk of Nicole  A. Powell.....