From: Sean Hefty Date: Wed, 22 Aug 2012 22:40:43 +0000 (-0700) Subject: Refresh of dbg-fork X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b3a08fb442f1734c2e58d2dee2e3034bb9370c85;p=~shefty%2Flibrdmacm.git Refresh of dbg-fork --- diff --git a/src/preload.c b/src/preload.c index d0fead29..bfa719b3 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;