jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject jena git commit: Extra checking for free memory return (JENA-977)
Date Fri, 24 Jul 2015 10:41:28 GMT
Repository: jena
Updated Branches:
  refs/heads/master 8b6a36dd2 -> d734e8abe


Extra checking for free memory return (JENA-977)

Really verify that the extracted free value is numeric and return
unavailable if it is not


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d734e8ab
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d734e8ab
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d734e8ab

Branch: refs/heads/master
Commit: d734e8abec82cfdf4c8ca9fdb415ba095077f093
Parents: 8b6a36d
Author: Rob Vesse <rvesse@apache.org>
Authored: Fri Jul 24 11:40:48 2015 +0100
Committer: Rob Vesse <rvesse@apache.org>
Committed: Fri Jul 24 11:40:48 2015 +0100

----------------------------------------------------------------------
 apache-jena/bin/tdbloader2common | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/d734e8ab/apache-jena/bin/tdbloader2common
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdbloader2common b/apache-jena/bin/tdbloader2common
index 6bdb8a8..8f0d462 100644
--- a/apache-jena/bin/tdbloader2common
+++ b/apache-jena/bin/tdbloader2common
@@ -110,6 +110,12 @@ function getFreeMem() {
             # Clean up free output on 3.x kernels
             FREE_MEM=$(echo "$FREE_MEM" | tail -n +2 | head | awk '{print $4}')
         esac
+
+        # Final check that the output is numeric
+        if [ ! "$FREE_MEM" -eq "$FREE_MEM" ] 2>/dev/null; then
+          # Non-numeric
+          FREE_MEM=-1
+        fi
       fi
       ;;
   esac


Mime
View raw message