Some of the less common terminal types haven't been tested with the
recent phonehome pid file changes and there may be error cases where
the pid file is never created.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
# to a file using a "phonehome" wrapper script, then monitor the pid
# until it exits.
import tempfile
+ import time
pidfile = tempfile.NamedTemporaryFile(delete = False).name
try:
sh_cmd = "oe-gnome-terminal-phonehome " + pidfile + " " + sh_cmd
raise ExecutionError(sh_cmd, pipe.returncode, output)
while os.stat(pidfile).st_size <= 0:
+ time.sleep(0.01)
continue
with open(pidfile, "r") as f:
pid = int(f.readline())
finally:
os.unlink(pidfile)
- import time
while True:
try:
os.kill(pid, 0)