]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of dbg-fork
authorSean Hefty <sean.hefty@intel.com>
Wed, 22 Aug 2012 22:03:29 +0000 (15:03 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 22 Aug 2012 22:03:29 +0000 (15:03 -0700)
src/preload.c

index 8889410b732597c8cb3f0e5f097a5f41146be4f6..b5a67cb7826f9ce73ea35f2204f5dbd957f34cc1 100644 (file)
@@ -34,6 +34,7 @@
 #if HAVE_CONFIG_H
 #  include <config.h>
 #endif /* HAVE_CONFIG_H */
+#include <stdio.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -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) {