]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of rstream-fork
authorSean Hefty <sean.hefty@intel.com>
Thu, 19 Jul 2012 22:13:57 +0000 (15:13 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 19 Jul 2012 22:13:57 +0000 (15:13 -0700)
examples/rstream.c

index 85956572941792059b2928110bc5122e5a46ecd6..490caa506a15e08a4d565e57c27d1670f48b6064 100644 (file)
@@ -557,7 +557,9 @@ static int run(void)
                        init_latency_test(test_size[i].size);
                        run_test();
                }
-               if (!fork_pid)
+               if (fork_pid)
+                       wait(NULL);
+               else
                        rs_shutdown(rs, SHUT_RDWR);
                rs_close(rs);
 
@@ -583,7 +585,9 @@ static int run(void)
                        ret = run_test();
        }
 
-       if (!fork_pid)
+       if (fork_pid)
+               wait(NULL);
+       else
                rs_shutdown(rs, SHUT_RDWR);
        rs_close(rs);
 free: