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

index d0fead2920124db945721aa824c643f8df947f9a..bfa719b32d6c7e4cfb3190f564d4996e44394122 100644 (file)
@@ -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;