jamvm-initial 1.4.5: Face random crashes with a silent retry.
authorRobert Schuster <robertschuster@fsfe.org>
Tue, 13 Jul 2010 13:46:41 +0000 (15:46 +0200)
committerRobert Schuster <robertschuster@fsfe.org>
Wed, 14 Jul 2010 05:59:41 +0000 (07:59 +0200)
jamvm-initial 1.5.0: Dito.

recipes/jamvm/files/jamvm_1.4.5-initial.patch
recipes/jamvm/files/jamvm_1.5.0-initial.patch
recipes/jamvm/jamvm-initial_1.4.5.bb
recipes/jamvm/jamvm-initial_1.5.0.bb

index 3c68818..f841271 100644 (file)
@@ -14,12 +14,21 @@ Index: jamvm-1.4.5/java-initial
 ===================================================================
 --- /dev/null
 +++ jamvm-1.4.5/java-initial
-@@ -0,0 +1,5 @@
+@@ -0,0 +1,14 @@
 +#!/bin/sh
 +#
-+# Wrapper script inspired by the one provided by cacao.
++# Wrapper which (almost) silently restarts the VM in case of segfaults.
 +
-+exec jamvm-initial ${1+"$@"}
++redo_from_start=1;
++while [ $redo_from_start -eq 1 ]; do
++    echo "Running JamVM: ${@}"
++    redo_from_start=0;
++    jamvm ${1+"$@"}
++    if [ $? -eq 139 ]; then
++        echo "JamVM crashed - silently trying again"
++        redo_from_start=1;
++    fi
++done
 Index: jamvm-1.4.5/lib/Makefile.am
 ===================================================================
 --- jamvm-1.4.5.orig/lib/Makefile.am
index 9b972da..3d5a4ae 100644 (file)
@@ -15,12 +15,21 @@ Index: jamvm-1.5.0/java-initial
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
 +++ jamvm-1.5.0/java-initial   2007-12-20 00:03:27.000000000 +0100
-@@ -0,0 +1,5 @@
+@@ -0,0 +1,14 @@
 +#!/bin/sh
 +#
-+# Wrapper script inspired by the one provided by cacao.
++# Wrapper which (almost) silently restarts the VM in case of segfaults.
 +
-+exec jamvm-initial ${1+"$@"}
++redo_from_start=1;
++while [ $redo_from_start -eq 1 ]; do
++    echo "Running JamVM: ${@}"
++    redo_from_start=0;
++    jamvm ${1+"$@"}
++    if [ $? -eq 139 ]; then
++        echo "JamVM crashed - silently trying again"
++        redo_from_start=1;
++    fi
++done
 Index: jamvm-1.5.0/lib/Makefile.am
 ===================================================================
 --- jamvm-1.5.0.orig/lib/Makefile.am   2007-12-20 00:05:24.000000000 +0100
index e3ace6d..301e806 100644 (file)
@@ -4,7 +4,7 @@ LICENSE = "GPL"
 
 DEPENDS = "zlib-native classpath-initial jikes-initial libffi-native"
 
-PR = "r1"
+PR = "r2"
 
 PROVIDES = "virtual/java-initial"
 
index 3986861..2a1fef6 100644 (file)
@@ -4,7 +4,7 @@ LICENSE = "GPL"
 
 DEPENDS = "zlib-native classpath-initial jikes-initial libffi-native"
 
-PR = "r1"
+PR = "r2"
 
 PROVIDES = "virtual/java-initial"