This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import psutil | |
def kill_proc_and_sub(pid): | |
print("kill proc and all it's subprocesses: {}".format(pid)) | |
try: | |
parent_process = psutil.Process(pid) | |
except Exception as ex: | |
print("kill proc failed: " + ex.message) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class StreamGobbler extends Thread | |
{ | |
InputStream is; | |
String type; | |
StreamGobbler(InputStream is, String type) | |
{ | |
this.is = is; |