As in the title, I've got a BaseThread running which i think doesnt die once process is finished.
The thread runs an ffmpeg call via subprocess.wait() (also tried communicate()). Everything seems to work but after closing cinema4d i cant reopen it, in the task manager there is a c4d process still there taking minimal resources. If i kill that task i can then reopen c4d again. My guess is im not using the threads correctly and the thread stays round after the process is finished.
My code below:
note: self.data is added to the thread elsewhere. Suppose I could add in init as well.
result = compile_av(**self.data)
if result is True:
path = os.path.dirname(self.data['output'])
open_path(path) # separate def that opens native os file browser at correct location
print('Something went wrong')
# Dont really get how TestBreak works..
print('Exiting thread please?')
And the subprocess:
p = subprocess.Popen(args=arg_list, shell=False)
if p.wait() == 0:
print "Failed - %s" % p.stdout.read()