]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of dup2
authorSean Hefty <sean.hefty@intel.com>
Wed, 1 Aug 2012 21:14:07 +0000 (14:14 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 1 Aug 2012 21:14:07 +0000 (14:14 -0700)
src/preload.c

index 52eaf1a52b31f083e542d1e6b88fd56e313e39f3..e230a56111c1fd182f085d83fcf2b3c8b162bf12 100644 (file)
@@ -886,3 +886,10 @@ int fcntl(int socket, int cmd, ... /* arg */)
        va_end(args);
        return ret;
 }
+
+int dup2(int oldfd, int newfd)
+{
+       int fd;
+       return (fd_get(oldfd, &fd) == fd_rsocket) ?
+               : dup2(oldfd, newfd);
+}