I'm using the VTE module in a GTK window, to run and show the result of a bash script.
adresse = self.champ.get_text()
pid = self.v.fork_command(None, ['/bin/bash', "./pluzz.sh", adresse])
if pid == None: #pseudocode
print "Finish"
The child process is blocking (don't run) if there's time.sleep, or a loop. How can I do ? Thanks
Edit: Tried this:
def check_pid(pid):
""" Check For the existence of a unix pid. """
try:
os.kill(pid, 0)
except OSError:
return False
else:
return True
The problem is the return is once True, and if I write a loop, the bash script is blocking.