From 65020c09a05b58b714a9e0e38533180aad23a027 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 22 Aug 2012 15:30:51 -0700 Subject: [PATCH] refresh --- meta | 7 +++--- patches/dbg-fork | 41 +++++++++++++++++++++++++++------ patches/refresh-temp | 55 -------------------------------------------- 3 files changed, 37 insertions(+), 66 deletions(-) delete mode 100644 patches/refresh-temp diff --git a/meta b/meta index d2852835..203f04ed 100644 --- a/meta +++ b/meta @@ -1,9 +1,8 @@ Version: 1 -Previous: 1bc07a06e62d9068fcd68eb43d7515f7c24822d6 -Head: 26ee20a544a5170ca1055443d3a80c84a7bc1633 +Previous: e55a1353348d5c164b057041f435857e7b4efd54 +Head: 768a0ea91022afb5a3189760936ddb5a39deecd9 Applied: - dbg-fork: 9079801a64f2313e2d48a27b87b285d7a267a56a - refresh-temp: 26ee20a544a5170ca1055443d3a80c84a7bc1633 + dbg-fork: 768a0ea91022afb5a3189760936ddb5a39deecd9 Unapplied: af_ib: 2e4bfa467343c57c68616c1922c01765df3ed1db dbg-out: 4b4c0572eab77856d8fbb919b1feb8f3502a101a diff --git a/patches/dbg-fork b/patches/dbg-fork index a731707e..d592fb6f 100644 --- a/patches/dbg-fork +++ b/patches/dbg-fork @@ -1,5 +1,5 @@ Bottom: 30191aa638f3f574e67a71c82fa7771bcc620c52 -Top: 296e6cd8f1f1213e16e0d247ff92a700dc79ef41 +Top: 3ff660268308f81ffa10068086e46e1eb0d84b77 Author: Sean Hefty Date: 2012-08-21 13:49:59 -0700 @@ -9,7 +9,7 @@ debug fork issue --- diff --git a/src/preload.c b/src/preload.c -index 0645f6d..b5a67cb 100644 +index 0645f6d..fba0281 100644 --- a/src/preload.c +++ b/src/preload.c @@ -34,6 +34,7 @@ @@ -44,7 +44,7 @@ index 0645f6d..b5a67cb 100644 ret = real.socket(domain, type, protocol); if (ret < 0) return ret; -@@ -502,6 +506,7 @@ static void fork_active(int socket) +@@ -502,24 +506,30 @@ static void fork_active(int socket) uint32_t msg; long flags; @@ -52,7 +52,17 @@ index 0645f6d..b5a67cb 100644 sfd = fd_getd(socket); flags = real.fcntl(sfd, F_GETFL); -@@ -516,10 +521,12 @@ static void fork_active(int socket) + real.fcntl(sfd, F_SETFL, 0); ++ printf("fork_active - recv\n"); + ret = real.recv(sfd, &msg, sizeof msg, MSG_PEEK); ++ printf("fork_active - recv %d\n", ret); + real.fcntl(sfd, F_SETFL, flags); + if ((ret != sizeof msg) || msg) + goto err1; + + len = sizeof addr; + ret = real.getpeername(sfd, (struct sockaddr *) &addr, &len); ++ printf("fork_active - getpeername %d\n", ret); if (ret) goto err1; @@ -65,7 +75,7 @@ index 0645f6d..b5a67cb 100644 ret = rconnect(dfd, (struct sockaddr *) &addr, len); if (ret) goto err2; -@@ -551,6 +558,7 @@ static void fork_passive(int socket) +@@ -551,6 +561,7 @@ static void fork_passive(int socket) socklen_t len; uint32_t msg; @@ -73,7 +83,7 @@ index 0645f6d..b5a67cb 100644 sfd = fd_getd(socket); len = sizeof sin6; -@@ -566,6 +574,7 @@ static void fork_passive(int socket) +@@ -566,6 +577,7 @@ static void fork_passive(int socket) ret = -1; goto out; } @@ -81,14 +91,31 @@ index 0645f6d..b5a67cb 100644 lfd = rsocket(sin6.sin6_family, SOCK_STREAM, 0); if (lfd < 0) { -@@ -589,6 +598,7 @@ static void fork_passive(int socket) +@@ -578,19 +590,24 @@ static void fork_passive(int socket) + + sem_wait(sem); + ret = rbind(lfd, (struct sockaddr *) &sin6, sizeof sin6); ++ printf("fork_passive bind %d\n", ret); + if (ret) + goto lclose; + + ret = rlisten(lfd, 1); ++ printf("fork_passive listen %d\n", ret); + if (ret) + goto lclose; + + msg = 0; len = real.write(sfd, &msg, sizeof msg); ++ printf("fork_passive write %d\n", len); if (len != sizeof msg) goto lclose; + printf("fork_passive - raccept\n"); dfd = raccept(lfd, NULL, NULL); ++ printf("fork_passive accept %d\n", dfd); if (dfd < 0) { + ret = dfd; + goto lclose; diff --git a/src/rsocket.c b/src/rsocket.c index 4c4821b..52476a2 100644 --- a/src/rsocket.c diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index 5c5e481b..00000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,55 +0,0 @@ -Bottom: 296e6cd8f1f1213e16e0d247ff92a700dc79ef41 -Top: 3ff660268308f81ffa10068086e46e1eb0d84b77 -Author: Sean Hefty -Date: 2012-08-22 15:30:51 -0700 - -Refresh of dbg-fork - ---- - -diff --git a/src/preload.c b/src/preload.c -index b5a67cb..fba0281 100644 ---- a/src/preload.c -+++ b/src/preload.c -@@ -511,13 +511,16 @@ static void fork_active(int socket) - - flags = real.fcntl(sfd, F_GETFL); - real.fcntl(sfd, F_SETFL, 0); -+ printf("fork_active - recv\n"); - ret = real.recv(sfd, &msg, sizeof msg, MSG_PEEK); -+ printf("fork_active - recv %d\n", ret); - real.fcntl(sfd, F_SETFL, flags); - if ((ret != sizeof msg) || msg) - goto err1; - - len = sizeof addr; - ret = real.getpeername(sfd, (struct sockaddr *) &addr, &len); -+ printf("fork_active - getpeername %d\n", ret); - if (ret) - goto err1; - -@@ -587,20 +590,24 @@ static void fork_passive(int socket) - - sem_wait(sem); - ret = rbind(lfd, (struct sockaddr *) &sin6, sizeof sin6); -+ printf("fork_passive bind %d\n", ret); - if (ret) - goto lclose; - - ret = rlisten(lfd, 1); -+ printf("fork_passive listen %d\n", ret); - if (ret) - goto lclose; - - msg = 0; - len = real.write(sfd, &msg, sizeof msg); -+ printf("fork_passive write %d\n", len); - if (len != sizeof msg) - goto lclose; - printf("fork_passive - raccept\n"); - - dfd = raccept(lfd, NULL, NULL); -+ printf("fork_passive accept %d\n", dfd); - if (dfd < 0) { - ret = dfd; - goto lclose; -- 2.41.0