]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: Update event queue handling to match upstream bitbake
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Jan 2011 13:12:35 +0000 (13:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Jan 2011 13:24:04 +0000 (13:24 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/event.py
bitbake/lib/bb/runqueue.py

index 8b45501c000d7c5abfddc7f9c4ce2f1de6529859..450d9136338b10cd55f8f25f3f1b7c09e3aa6e84 100644 (file)
@@ -129,13 +129,11 @@ def fire(event, d):
 def worker_fire(event, d):
     data = "<event>" + pickle.dumps(event) + "</event>"
     worker_pipe.write(data)
-    worker_pipe.flush()
 
 def fire_from_worker(event, d):
     if not event.startswith("<event>") or not event.endswith("</event>"):
         print("Error, not an event %s" % event)
         return
-    #print "Got event %s" % event
     event = pickle.loads(event[7:-8])
     fire_ui_handlers(event, d)
 
index 8580f51693818357aaeba37ad5a53c373faaf111..054191b8c998b4de8d1352bd9963185b0c26499d 100644 (file)
@@ -1083,10 +1083,9 @@ class RunQueueExecute:
         sys.stdout.flush()
         sys.stderr.flush()
         try:
-            pipeinfd, pipeoutfd = os.pipe()
-            pipein = os.fdopen(pipeinfd, 'rb', 4096)
-            pipeout = os.fdopen(pipeoutfd, 'wb', 4096)
-
+            pipein, pipeout = os.pipe()
+            pipein = os.fdopen(pipein, 'rb', 4096)
+            pipeout = os.fdopen(pipeout, 'wb', 0)
             pid = os.fork()
         except OSError as e:
             bb.msg.fatal(bb.msg.domain.RunQueue, "fork failed: %d (%s)" % (e.errno, e.strerror))