[oe-commits] [bitbake] branch master-next updated: fixes
git at git.openembedded.org
git at git.openembedded.org
Mon Jul 17 14:27:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
The following commit(s) were added to refs/heads/master-next by this push:
new 25ea8f3 fixes
25ea8f3 is described below
commit 25ea8f36863b612a61b3bcb6a8ed107c79572722
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Jul 17 15:26:11 2017 +0100
fixes
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/daemonize.py | 3 ++-
lib/bb/server/process.py | 27 +++++++++++++++------------
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/lib/bb/daemonize.py b/lib/bb/daemonize.py
index ab4a954..6b5414b 100644
--- a/lib/bb/daemonize.py
+++ b/lib/bb/daemonize.py
@@ -124,6 +124,7 @@ def createDaemon(function, logfile):
# streams to be flushed twice and any temporary files may be unexpectedly
# removed. It's therefore recommended that child branches of a fork()
# and the parent branch(es) of a daemon use _exit().
+ os.waitpid(pid, 0)
return
# Close all open file descriptors. This prevents the child from keeping
@@ -179,7 +180,7 @@ def createDaemon(function, logfile):
si = open('/dev/null', 'r')
- so = open(logfile, 'w')
+ so = open(logfile, 'a+')
se = so
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 9e181aa..3b18ffd 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -338,6 +338,7 @@ class BitBakeServer(object):
os.set_inheritable(self.sock.fileno(), True)
bb.daemonize.createDaemon(self._startServer, "bitbake-cookerdaemon.log")
self.sock.close()
+ bb.utils.unlockfile(lock)
def _startServer(self):
server = ProcessServer(self.bitbake_lock, self.sock, self.sockname)
@@ -353,6 +354,7 @@ class BitBakeServer(object):
server.cooker = self.cooker
server.server_timeout = self.configuration.server_timeout
server.xmlrpcinterface = self.configuration.xmlrpcinterface
+ print("Started bitbake server pid %d" % os.getpid())
server.start()
def connectProcessServer(sockname, featureset):
@@ -360,25 +362,26 @@ def connectProcessServer(sockname, featureset):
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# AF_UNIX has path length issues so chdir here to workaround
cwd = os.getcwd()
+
try:
os.chdir(os.path.dirname(sockname))
sock.connect(os.path.basename(sockname))
finally:
os.chdir(cwd)
- # Send an fd for the remote to write events to
- readfd, writefd = os.pipe()
- eq = BBUIEventQueue(readfd)
- # Send an fd for the remote to recieve commands from
- readfd1, writefd1 = os.pipe()
- command_chan = ConnectionWriter(writefd1)
- # Send an fd for the remote to write commands results to
- readfd2, writefd2 = os.pipe()
- command_chan_recv = ConnectionReader(readfd2)
-
- sendfds(sock, [writefd, readfd1, writefd2])
-
try:
+ # Send an fd for the remote to write events to
+ readfd, writefd = os.pipe()
+ eq = BBUIEventQueue(readfd)
+ # Send an fd for the remote to recieve commands from
+ readfd1, writefd1 = os.pipe()
+ command_chan = ConnectionWriter(writefd1)
+ # Send an fd for the remote to write commands results to
+ readfd2, writefd2 = os.pipe()
+ command_chan_recv = ConnectionReader(readfd2)
+
+ sendfds(sock, [writefd, readfd1, writefd2])
+
server_connection = BitBakeProcessServerConnection(command_chan, command_chan_recv, eq)
server_connection.connection.updateFeatureSet(featureset)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list