[oe-commits] [openembedded-core] 109/116: pseudo: Move logging setup to earlier in the server startup

git at git.openembedded.org git at git.openembedded.org
Sun Feb 28 11:30:35 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 022c926525530a6b82a23819255b6730953c7841
Author: Mark Hatle <mark.hatle at windriver.com>
AuthorDate: Fri Feb 19 08:43:09 2016 -0600

    pseudo: Move logging setup to earlier in the server startup
    
    We may be having errors opening the lock file or sockets, but the
    diagnostic messages may be lost.  Move the logging earlier in an
    attempt to determine why the server is not starting.
    
    Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../pseudo-Move-logging-to-much-earlier.patch      | 58 ++++++++++++++++++++++
 meta/recipes-devtools/pseudo/pseudo_1.7.5.bb       |  1 +
 2 files changed, 59 insertions(+)

diff --git a/meta/recipes-devtools/pseudo/files/pseudo-Move-logging-to-much-earlier.patch b/meta/recipes-devtools/pseudo/files/pseudo-Move-logging-to-much-earlier.patch
new file mode 100644
index 0000000..a08bd5c
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/pseudo-Move-logging-to-much-earlier.patch
@@ -0,0 +1,58 @@
+From 85dc959ed70242d6f69120204610561d8fc45dee Mon Sep 17 00:00:00 2001
+From: Mark Hatle <mark.hatle at windriver.com>
+Date: Fri, 19 Feb 2016 08:40:02 -0600
+Subject: [PATCH] pseudo: Move logging to much earlier
+
+We need to capture to the log-file, if enabled, server errors with the
+lock file, or opening the socket.  Moving the logging much earlier in the
+server startup will permit this.  However, it may hide some early diagnostics
+from stderr.
+
+Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
+---
+ ChangeLog.txt   | 3 +++
+ pseudo.c        | 4 ++++
+ pseudo_server.c | 1 -
+ 3 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog.txt b/ChangeLog.txt
+index 40e9235..af322f7 100644
+--- a/ChangeLog.txt
++++ b/ChangeLog.txt
+@@ -1,3 +1,6 @@
++2016-02-19:
++	* (mhatle) Move pseudo server logging much earlier
++
+ 2016-02-16:
+ 	* (seebs) attempt at diagnostics for client failures
+ 	* (seebs) don't try to force pseudo's debug fd to fd 2 in clients.
+diff --git a/pseudo.c b/pseudo.c
+index 4451992..fde21a4 100644
+--- a/pseudo.c
++++ b/pseudo.c
+@@ -442,6 +442,10 @@ main(int argc, char *argv[]) {
+ 	/* if we got here, we are not running a command, and we are not in
+ 	 * a pseudo environment.
+ 	 */
++
++	/* Start logging, otherwise we don't get early errors */
++	pseudo_logfile(PSEUDO_LOGFILE, 2);
++
+ 	pseudo_new_pid();
+ 
+ 	pseudo_debug(PDBGF_SERVER, "opening lock.\n");
+diff --git a/pseudo_server.c b/pseudo_server.c
+index 7127082..ebb3b68 100644
+--- a/pseudo_server.c
++++ b/pseudo_server.c
+@@ -165,7 +165,6 @@ pseudo_server_start(int daemonize) {
+ 		pseudo_new_pid();
+ 		fclose(stdin);
+ 		fclose(stdout);
+-		pseudo_logfile(PSEUDO_LOGFILE, 2);
+ 	} else {
+ 		/* Write the pid if we don't daemonize */
+ 		pseudo_server_write_pid(getpid());
+-- 
+2.5.0
+
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb b/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
index a024056..63f93e6 100644
--- a/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
@@ -8,6 +8,7 @@ SRC_URI = " \
     file://pseudo-client-diagnostics.patch \
     file://pseudo-fix-client-logging.patch \
     file://pseudo-Add-additional-logging-around-client-start.patch \
+    file://pseudo-Move-logging-to-much-earlier.patch \
 "
 
 SRC_URI[md5sum] = "c10209938f03128d0c193f041ff3596d"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list