summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2016-08-05 00:04:26 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-10 10:46:31 +0100
commit17d728dede5ccc5c52c35452cb58e578ed648935 (patch)
tree5c88fe9a575580ec0b5a322496e077ce1d03e504
parentce1cf85bd2789f2fa2620134afce3616d5583337 (diff)
downloadpoky-17d728dede5ccc5c52c35452cb58e578ed648935.tar.gz
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>
-rw-r--r--meta/lib/oe/terminal.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 6d6a29f983..3901ad3f26 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -76,9 +76,11 @@ class Gnome(XTerminal):
76 finally: 76 finally:
77 os.unlink(pidfile) 77 os.unlink(pidfile)
78 78
79 import time
79 while True: 80 while True:
80 try: 81 try:
81 os.kill(pid, 0) 82 os.kill(pid, 0)
83 time.sleep(0.1)
82 except OSError: 84 except OSError:
83 return 85 return
84 86