terminal: Add sleep in pid-monitor loop

Monitoring the process started by gnome-terminal was
spinning in a busy-loop. Insert some sleeping so that
we don't eat all the cpu.

(From OE-Core rev: 314937429d700204f296cfd1c0c5f215a2e5b939)

Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jacob Kroon 2016-08-05 00:04:26 +02:00 committed by Richard Purdie
parent ce1cf85bd2
commit 17d728dede
1 changed files with 2 additions and 0 deletions

View File

@ -76,9 +76,11 @@ class Gnome(XTerminal):
finally:
os.unlink(pidfile)
import time
while True:
try:
os.kill(pid, 0)
time.sleep(0.1)
except OSError:
return