From: Jacob Kroon Date: Thu, 4 Aug 2016 22:04:26 +0000 (+0200) Subject: terminal: Add sleep in pid-monitor loop X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~24740 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=314937429d700204f296cfd1c0c5f215a2e5b939;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Jacob Kroon Signed-off-by: Ross Burton --- diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py index 6d6a29f983e..3901ad3f26b 100644 --- a/meta/lib/oe/terminal.py +++ b/meta/lib/oe/terminal.py @@ -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