aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/jamvm/files
diff options
context:
space:
mode:
authorRobert Schuster <robertschuster@fsfe.org>2010-07-14 08:50:25 +0200
committerRobert Schuster <robertschuster@fsfe.org>2010-07-16 14:07:49 +0200
commita573f4c1b5a5bdd8def89a33128ff7c4d544f30c (patch)
tree18a952887b7788466c1598ba4d1b803e96d043e8 /recipes/jamvm/files
parente2cd1d0756f2d228a64d280afe1b064c27a8aa96 (diff)
downloadopenembedded-a573f4c1b5a5bdd8def89a33128ff7c4d544f30c.tar.gz
jamvm-native: Add automatic restart workaround to native package as well.
Diffstat (limited to 'recipes/jamvm/files')
-rw-r--r--recipes/jamvm/files/java15
1 files changed, 15 insertions, 0 deletions
diff --git a/recipes/jamvm/files/java b/recipes/jamvm/files/java
new file mode 100644
index 0000000000..0cc72cbed8
--- /dev/null
+++ b/recipes/jamvm/files/java
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Wrapper which (almost) silently restarts the VM in case of segfaults.
+
+redo_from_start=1;
+while [ $redo_from_start -eq 1 ]; do
+ echo "Running JamVM-native: ${@}"
+ redo_from_start=0;
+ jamvm ${1+"$@"}
+ if [ $? -eq 139 ]; then
+ echo "JamVM-native crashed - silently trying again"
+ redo_from_start=1;
+ fi
+done
+