[oe-commits] [openembedded-core] 07/10: pseudo mk3

git at git.openembedded.org git at git.openembedded.org
Fri Feb 26 17:58:49 UTC 2016


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

commit f1b7d5276a6c1f00087dda5e07025c96755d7fee
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Feb 23 00:16:11 2016 +0000

    pseudo mk3
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/pseudo/files/rphack.patch | 77 ++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/pseudo/files/rphack.patch b/meta/recipes-devtools/pseudo/files/rphack.patch
index e06c6da..a0fe6c6 100644
--- a/meta/recipes-devtools/pseudo/files/rphack.patch
+++ b/meta/recipes-devtools/pseudo/files/rphack.patch
@@ -136,9 +136,84 @@ Index: pseudo-1.7.5/pseudo_client.c
  				int ms = (getpid() % 5) + 3 + tries;
  				struct timespec delay = { .tv_sec = 0, .tv_nsec = ms * 1000000 };
  				nanosleep(&delay, NULL);
-+				if (tries > 40) {
++				if (tries > 3) {
 +					pseudo_dump_lastlogs();
 +				}
  			}
  			fail_reasons[tries] = strdup(pseudo_client_setup_log);
  			continue;
+Index: pseudo-1.7.5/pseudo.c
+===================================================================
+--- pseudo-1.7.5.orig/pseudo.c
++++ pseudo-1.7.5/pseudo.c
+@@ -452,18 +452,21 @@ main(int argc, char *argv[]) {
+ 	lockpath = pseudo_localstatedir_path(NULL);
+ 	if (!lockpath) {
+ 		pseudo_diag("Couldn't allocate a file path.\n");
++		pseudo_dump_lastlogs();
+ 		exit(EXIT_FAILURE);
+ 	}
+ 	mkdir_p(lockpath);
+ 	lockname = pseudo_localstatedir_path(PSEUDO_LOCKFILE);
+ 	if (!lockname) {
+ 		pseudo_diag("Couldn't allocate a file path.\n");
++		pseudo_dump_lastlogs();
+ 		exit(EXIT_FAILURE);
+ 	}
+ 	lockfd = open(lockname, O_RDWR | O_CREAT, 0644);
+ 	if (lockfd < 0) {
+ 		pseudo_diag("Can't open or create lockfile %s: %s\n",
+ 			lockname, strerror(errno));
++		pseudo_dump_lastlogs();
+ 		exit(EXIT_FAILURE);
+ 	}
+ 	free(lockname);
+@@ -486,6 +489,7 @@ main(int argc, char *argv[]) {
+ 		} else {
+ 			pseudo_diag("pseudo: Error obtaining lock: %s\n", strerror(errno));
+ 		}
++		pseudo_dump_lastlogs();
+ 		exit(0);
+ 	} else {
+ 		pseudo_debug(PDBGF_SERVER, "Acquired lock.\n");
+Index: pseudo-1.7.5/pseudo_server.c
+===================================================================
+--- pseudo-1.7.5.orig/pseudo_server.c
++++ pseudo-1.7.5/pseudo_server.c
+@@ -117,6 +117,7 @@ pseudo_server_start(int daemonize) {
+ 	listen_fd = socket(PF_UNIX, SOCK_STREAM, 0);
+ 	if (listen_fd < 0) {
+ 		pseudo_diag("couldn't create listening socket: %s\n", strerror(errno));
++		pseudo_dump_lastlogs();
+ 		return 1;
+ 	}
+ 
+@@ -125,6 +126,7 @@ pseudo_server_start(int daemonize) {
+ 		if (newfd < 0) {
+ 			pseudo_diag("couldn't dup listening socket: %s\n", strerror(errno));
+ 			close(listen_fd);
++			pseudo_dump_lastlogs();
+ 			return 1;
+ 		} else {
+ 			close(listen_fd);
+@@ -137,6 +139,7 @@ pseudo_server_start(int daemonize) {
+ 	if (!pseudo_path || chdir(pseudo_path) == -1) {
+ 		pseudo_diag("can't get to '%s': %s\n",
+ 			pseudo_path, strerror(errno));
++		pseudo_dump_lastlogs();
+ 		return 1;
+ 	}
+ 	free(pseudo_path);
+@@ -144,10 +147,12 @@ pseudo_server_start(int daemonize) {
+ 	unlink(sun.sun_path);
+ 	if (bind(listen_fd, (struct sockaddr *) &sun, sizeof(sun)) == -1) {
+ 		pseudo_diag("couldn't bind listening socket: %s\n", strerror(errno));
++		pseudo_dump_lastlogs();
+ 		return 1;
+ 	}
+ 	if (listen(listen_fd, 5) == -1) {
+ 		pseudo_diag("couldn't listen on socket: %s\n", strerror(errno));
++		pseudo_dump_lastlogs();
+ 		return 1;
+ 	}
+ 	if (daemonize) {

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


More information about the Openembedded-commits mailing list