浏览代码

Merge remote-tracking branch 'origin/candidate-5.0.4'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 年之前
父节点
当前提交
3dbbc8c6e9
共有 2 个文件被更改,包括 17 次插入7 次删除
  1. 7 2
      system/jlib/jsocket.cpp
  2. 10 5
      testing/regress/ecl/pipe8.ecl

+ 7 - 2
system/jlib/jsocket.cpp

@@ -2559,9 +2559,10 @@ bool isInterfaceIp(const IpAddress &ip, const char *ifname)
 
 bool getInterfaceIp(IpAddress &ip,const char *ifname)
 {
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__APPLE__)
     return false;
 #else
+    static bool recursioncheck = false;
     ip.ipset(NULL);
     int fd = socket(AF_INET, SOCK_DGRAM, 0);  // IPV6 TBD
     if (fd<0)
@@ -2590,7 +2591,11 @@ bool getInterfaceIp(IpAddress &ip,const char *ifname)
             IpAddress iptest((inet_ntoa(((struct sockaddr_in *)&item->ifr_addr)->sin_addr)));
             if (ioctl(fd, SIOCGIFFLAGS, item) < 0)
             {
-                DBGLOG("Error retrieving interface flags for interface %s", item->ifr_name);
+                if (!recursioncheck) {
+                    recursioncheck = true;
+                    DBGLOG("Error retrieving interface flags for interface %s", item->ifr_name);
+                    recursioncheck = false;
+                }
                 continue;
             }
             bool isLoopback = iptest.isLoopBack() || ((item->ifr_flags & IFF_LOOPBACK) != 0);

+ 10 - 5
testing/regress/ecl/pipe8.ecl

@@ -17,6 +17,7 @@
 
 import lib_stringlib;
 import std.str;
+import std.system.thorlib;
 
 nameRecord := RECORD
     STRING name;
@@ -47,6 +48,10 @@ tempname1 := getTempFilename2() : INDEPENDENT;
 tempname2 := getTempFilename3() : INDEPENDENT;
 tempname3 := getTempFilename4() : INDEPENDENT;
 
+tempname1s := tempname1 + thorlib.node();
+tempname2s := tempname2 + thorlib.node();
+tempname3s := tempname3 + thorlib.node();
+
 #IF (__OS__ = 'windows')
   STRING catCmd(STRING filename) := 'cmd /C cat > ' + filename;
 #ELSE
@@ -73,13 +78,13 @@ csvRec := { STRING lout; };
 
 SEQUENTIAL(
  PARALLEL(
-  OUTPUT(d1,,PIPE(catCmd(tempname1))),
-  OUTPUT(d4,,PIPE(catCmd(tempname2), csv)),
-  OUTPUT(d1,,PIPE(catCmd(tempname3), xml(noroot)))
+  OUTPUT(d1,,PIPE(catCmd(tempname1s))),
+  OUTPUT(d4,,PIPE(catCmd(tempname2s), csv)),
+  OUTPUT(d1,,PIPE(catCmd(tempname3s), xml(noroot)))
  ),
  PARALLEL(
-  OUTPUT(PIPE('sort ' + tempname2, csvRec, csv)),
-  OUTPUT(PIPE('cat ' + tempname3, houseRecord, xml('Dataset/Row')))
+  OUTPUT(PIPE('sort ' + tempname2s, csvRec, csv)),
+  OUTPUT(PIPE('cat ' + tempname3s, houseRecord, xml('Dataset/Row')))
  )
 );