From 6c0411cd98702699f66edf9d83eb0c8f127887f3 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 22 Aug 2012 15:03:29 -0700 Subject: [PATCH] Refresh of dbg-fork --- src/preload.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/preload.c b/src/preload.c index 8889410b..b5a67cb7 100644 --- a/src/preload.c +++ b/src/preload.c @@ -34,6 +34,7 @@ #if HAVE_CONFIG_H # include #endif /* HAVE_CONFIG_H */ +#include #include #include @@ -413,6 +414,7 @@ int socket(int domain, int type, int protocol) return index; recursive = 1; +printf("skipping rsocket call\n"); goto realsock; ret = rsocket(domain, type, protocol); recursive = 0; @@ -504,6 +506,7 @@ 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); @@ -518,10 +521,12 @@ static void fork_active(int socket) 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; @@ -553,6 +558,7 @@ static void fork_passive(int socket) socklen_t len; uint32_t msg; + printf("fork_passive\n"); sfd = fd_getd(socket); len = sizeof sin6; @@ -568,6 +574,7 @@ 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) { @@ -591,6 +598,7 @@ static void fork_passive(int socket) len = real.write(sfd, &msg, sizeof msg); if (len != sizeof msg) goto lclose; + printf("fork_passive - raccept\n"); dfd = raccept(lfd, NULL, NULL); if (dfd < 0) { -- 2.45.2