Version: 1
-Previous: 017d3cf300947dc8fbe0256511e2d9d484b69f5c
-Head: b3a08fb442f1734c2e58d2dee2e3034bb9370c85
+Previous: 00648f61fccb69141efaeea8c60c68b29b9047b6
+Head: 5679a32af8305db3c0406f9abb961259304a384a
Applied:
- dbg-fork: 36241f2ee01353749ffbde97e38faa9893ca6a25
- refresh-temp: b3a08fb442f1734c2e58d2dee2e3034bb9370c85
+ dbg-fork: 5679a32af8305db3c0406f9abb961259304a384a
Unapplied:
af_ib: 2e4bfa467343c57c68616c1922c01765df3ed1db
dbg-out: 4b4c0572eab77856d8fbb919b1feb8f3502a101a
Bottom: 30191aa638f3f574e67a71c82fa7771bcc620c52
-Top: 24c419a565e8be47500329bc1ba94c160d8d19e1
+Top: 5af5ac17fbea4057817c2bc894127f91eade6ffd
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2012-08-21 13:49:59 -0700
---
diff --git a/src/preload.c b/src/preload.c
-index 0645f6d..d0fead2 100644
+index 0645f6d..bfa719b 100644
--- a/src/preload.c
+++ b/src/preload.c
@@ -34,6 +34,7 @@
ret = real.socket(domain, type, protocol);
if (ret < 0)
return ret;
-@@ -502,24 +510,30 @@ static void fork_active(int socket)
- uint32_t msg;
- long flags;
-
-+ printf("fork_active\n");
- sfd = fd_getd(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;
-
-+ printf("fork_active - create rsocket\n");
- dfd = rsocket(addr.ss_family, SOCK_STREAM, 0);
- if (dfd < 0)
- goto err1;
-
-+ printf("fork_active - rconnect\n");
- ret = rconnect(dfd, (struct sockaddr *) &addr, len);
- if (ret)
- goto err2;
-@@ -551,21 +565,25 @@ static void fork_passive(int socket)
- socklen_t len;
- uint32_t msg;
-
-+ printf("fork_passive\n");
- sfd = fd_getd(socket);
-
- len = sizeof sin6;
- ret = real.getsockname(sfd, (struct sockaddr *) &sin6, &len);
-+ printf("fork_passive - getsockname %d\n", ret);
- if (ret)
- goto out;
+@@ -560,6 +568,7 @@ static void fork_passive(int socket)
sin6.sin6_flowinfo = sin6.sin6_scope_id = 0;
memset(&sin6.sin6_addr, 0, sizeof sin6.sin6_addr);
sem = sem_open("/rsocket_fork", O_CREAT | O_RDWR,
S_IRWXU | S_IRWXG, 1);
if (sem == SEM_FAILED) {
- ret = -1;
- goto out;
- }
-+ printf("fork_passive - create rsocket\n");
-
- lfd = rsocket(sin6.sin6_family, SOCK_STREAM, 0);
- if (lfd < 0) {
-@@ -578,19 +596,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
+++ /dev/null
-Bottom: 24c419a565e8be47500329bc1ba94c160d8d19e1
-Top: 5af5ac17fbea4057817c2bc894127f91eade6ffd
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2012-08-22 15:40:43 -0700
-
-Refresh of dbg-fork
-
----
-
-diff --git a/src/preload.c b/src/preload.c
-index d0fead2..bfa719b 100644
---- a/src/preload.c
-+++ b/src/preload.c
-@@ -510,30 +510,24 @@ static void fork_active(int socket)
- uint32_t msg;
- long flags;
-
-- printf("fork_active\n");
- sfd = fd_getd(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;
-
-- printf("fork_active - create rsocket\n");
- dfd = rsocket(addr.ss_family, SOCK_STREAM, 0);
- if (dfd < 0)
- goto err1;
-
-- printf("fork_active - rconnect\n");
- ret = rconnect(dfd, (struct sockaddr *) &addr, len);
- if (ret)
- goto err2;
-@@ -565,12 +559,10 @@ static void fork_passive(int socket)
- socklen_t len;
- uint32_t msg;
-
-- printf("fork_passive\n");
- sfd = fd_getd(socket);
-
- len = sizeof sin6;
- ret = real.getsockname(sfd, (struct sockaddr *) &sin6, &len);
-- printf("fork_passive - getsockname %d\n", ret);
- if (ret)
- goto out;
- sin6.sin6_flowinfo = sin6.sin6_scope_id = 0;
-@@ -583,7 +575,6 @@ static void fork_passive(int socket)
- ret = -1;
- goto out;
- }
-- printf("fork_passive - create rsocket\n");
-
- lfd = rsocket(sin6.sin6_family, SOCK_STREAM, 0);
- if (lfd < 0) {
-@@ -596,24 +587,19 @@ 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;