Version: 1
-Previous: dd77506c086c529a18b220afad382f581f7307d7
-Head: 04beec0a038d5a81ee465f2189afe51e8e2cea70
+Previous: c5d1f7512d2f436cb136247ec4fc42df2c21abd9
+Head: 1b0c2228ed7f0ad1ce3965c5e7308b914e3bcc1c
Applied:
real-close: 3409f8d6af187d25c63a5d1f8ee8bff5f14555e2
dup2: ca5813e7cf95dee5933fc417e4a34d26f2b01824
oobinline: ac51c1095f505373a6ec54b8f1d990259fb34d97
fstat: a62c653906870422edef5f6388dac9f76c953e35
- dbg-out: 7c2e2c8b0b359ed49821ff00dc8322207420b51d
- refresh-temp: 04beec0a038d5a81ee465f2189afe51e8e2cea70
+ dbg-out: 1b0c2228ed7f0ad1ce3965c5e7308b914e3bcc1c
Unapplied:
dbg: 0c269855776d3001e37da8c8afe283c20e1d6cd6
waitall-buggy: c49c6b56c55385774065f5aa2704078e6ae0ceb8
Bottom: 6bbb92f637582964eea7a287f91549c84da9571a
-Top: 0c9aee56dbaecfa138715806a5905cd74993c1b4
+Top: 7e9324f4bc6bed6e487a8af4f7f36cb559ab4572
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2012-08-07 21:30:48 -0700
---
diff --git a/src/preload.c b/src/preload.c
-index 53f8543..4379bfc 100644
+index 53f8543..be2487f 100644
--- a/src/preload.c
+++ b/src/preload.c
@@ -48,6 +48,8 @@
return index;
}
fd_close(index, &ret);
-@@ -465,6 +475,8 @@ static int fork_active(int socket, const struct sockaddr *addr, socklen_t addrle
+@@ -432,6 +442,8 @@ int accept(int socket, struct sockaddr *addr, socklen_t *addrlen)
+ enum fd_type type;
+
+ type = fd_get(socket, &fd);
++ fprintf(fout, "%d accept fd %d\n", syscall(SYS_gettid), socket);
++ fflush(fout);
+ if (type == fd_rsocket || type == fd_fork) {
+ index = fd_open();
+ if (index < 0)
+@@ -444,6 +456,8 @@ int accept(int socket, struct sockaddr *addr, socklen_t *addrlen)
+ return ret;
+ }
+
++ fprintf(fout, "%d accept fd %d new fd\n", syscall(SYS_gettid), socket, index);
++ fflush(fout);
+ fd_store(index, ret, type);
+ return index;
+ } else {
+@@ -465,6 +479,8 @@ static int fork_active(int socket, const struct sockaddr *addr, socklen_t addrle
long flags;
fd = fd_getd(socket);
flags = real.fcntl(fd, F_GETFL);
real.fcntl(fd, F_SETFL, 0);
ret = real.connect(fd, addr, addrlen);
-@@ -495,6 +507,8 @@ static void fork_passive(int socket)
+@@ -495,6 +511,8 @@ static void fork_passive(int socket)
uint32_t msg;
fd_get(socket, &sfd);
len = sizeof sin6;
ret = real.getsockname(sfd, (struct sockaddr *) &sin6, &len);
-@@ -527,11 +541,17 @@ static void fork_passive(int socket)
+@@ -527,11 +545,17 @@ static void fork_passive(int socket)
ret = rlisten(lfd, 1);
if (ret)
goto lclose;
dfd = raccept(lfd, NULL, NULL);
if (dfd < 0) {
-@@ -547,6 +567,8 @@ static void fork_passive(int socket)
+@@ -547,6 +571,8 @@ static void fork_passive(int socket)
real.shutdown(sfd, SHUT_RDWR);
real.close(sfd);
fd_store(socket, dfd, fd_rsocket);
lclose:
rclose(lfd);
-@@ -924,6 +946,7 @@ int dup2(int oldfd, int newfd)
+@@ -924,6 +950,7 @@ int dup2(int oldfd, int newfd)
int ret;
init_preload();
oldfdi = idm_lookup(&idm, oldfd);
if (oldfdi && oldfdi->type == fd_fork)
fork_passive(oldfd);
-@@ -968,12 +991,18 @@ int __fxstat64(int ver, int socket, struct stat64 *buf)
+@@ -968,12 +995,18 @@ int __fxstat64(int ver, int socket, struct stat64 *buf)
{
int fd, ret;
+++ /dev/null
-Bottom: 0c9aee56dbaecfa138715806a5905cd74993c1b4
-Top: 7e9324f4bc6bed6e487a8af4f7f36cb559ab4572
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2012-08-07 21:50:58 -0700
-
-Refresh of dbg-out
-
----
-
-diff --git a/src/preload.c b/src/preload.c
-index 4379bfc..be2487f 100644
---- a/src/preload.c
-+++ b/src/preload.c
-@@ -442,6 +442,8 @@ int accept(int socket, struct sockaddr *addr, socklen_t *addrlen)
- enum fd_type type;
-
- type = fd_get(socket, &fd);
-+ fprintf(fout, "%d accept fd %d\n", syscall(SYS_gettid), socket);
-+ fflush(fout);
- if (type == fd_rsocket || type == fd_fork) {
- index = fd_open();
- if (index < 0)
-@@ -454,6 +456,8 @@ int accept(int socket, struct sockaddr *addr, socklen_t *addrlen)
- return ret;
- }
-
-+ fprintf(fout, "%d accept fd %d new fd\n", syscall(SYS_gettid), socket, index);
-+ fflush(fout);
- fd_store(index, ret, type);
- return index;
- } else {