aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/jamvm/files/java
blob: 0cc72cbed8b8652b6ca865ca6685454c62ebe0f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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