]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Thu, 23 Aug 2012 18:31:58 +0000 (11:31 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 23 Aug 2012 18:31:58 +0000 (11:31 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 979203b016e46a343f5d6786f7aac76a1442826f..6e6b4d2745602774dade51c34f2e6c393eb54f54 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,9 @@
 Version: 1
-Previous: 76c63745415a52c6b11702275582ad120c688673
-Head: d30bdb2dc3790f8b9ca2b1ee538af60020bc24da
+Previous: be44f7378b7e6e83df983f87e55ae3e14498dd05
+Head: 5185cbcc0ca048c3492ed2af2abfcf5e8810f0a3
 Applied:
   fork-fix: d30bdb2dc3790f8b9ca2b1ee538af60020bc24da
+  refresh-temp: 5185cbcc0ca048c3492ed2af2abfcf5e8810f0a3
 Unapplied:
   dbg-fork: 5679a32af8305db3c0406f9abb961259304a384a
   af_ib: 2e4bfa467343c57c68616c1922c01765df3ed1db
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..c073794
--- /dev/null
@@ -0,0 +1,45 @@
+Bottom: 30191aa638f3f574e67a71c82fa7771bcc620c52
+Top:    f28ec49823485e069c95d7c5851dbd01583cf091
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2012-08-23 11:31:58 -0700
+
+Refresh of fork-fix
+
+---
+
+diff --git a/src/preload.c b/src/preload.c
+index 0645f6d..4ba38f5 100644
+--- a/src/preload.c
++++ b/src/preload.c
+@@ -412,20 +412,21 @@ int socket(int domain, int type, int protocol)
+       if (index < 0)
+               return index;
++      if (fork_support && (domain == PF_INET || domain == PF_INET6) &&
++          (type == SOCK_STREAM) && (!protocol || protocol == IPPROTO_TCP)) {
++              ret = real.socket(domain, type, protocol);
++              if (ret < 0)
++                      return ret;
++              fd_store(index, ret, fd_normal, fd_fork);
++              return index;
++      }
++
+       recursive = 1;
+       ret = rsocket(domain, type, protocol);
+       recursive = 0;
+       if (ret >= 0) {
+-              if (fork_support) {
+-                      rclose(ret);
+-                      ret = real.socket(domain, type, protocol);
+-                      if (ret < 0)
+-                              return ret;
+-                      fd_store(index, ret, fd_normal, fd_fork);
+-              } else {
+-                      fd_store(index, ret, fd_rsocket, fd_ready);
+-                      set_rsocket_options(ret);
+-              }
++              fd_store(index, ret, fd_rsocket, fd_ready);
++              set_rsocket_options(ret);
+               return index;
+       }
+       fd_close(index, &ret);