Lines 49-57
Link Here
|
49 |
esac |
49 |
esac |
50 |
fi |
50 |
fi |
51 |
|
51 |
|
52 |
segv_output=`basename "$prog"`.segv.$$ |
52 |
segv_output=`mktemp \`basename "$prog".segv.XXXXXX\`` || exit 1 |
53 |
# Make sure this output file does not exist. |
|
|
54 |
rm -f "$segv_output" |
55 |
|
53 |
|
56 |
# Redirect stderr to avoid termination message from shell. |
54 |
# Redirect stderr to avoid termination message from shell. |
57 |
(exec 3>&2 2>/dev/null |
55 |
(exec 3>&2 2>/dev/null |
Lines 64-70
Link Here
|
64 |
# Check for output. Even if the program terminated correctly it might |
62 |
# Check for output. Even if the program terminated correctly it might |
65 |
# be that a minor process (clone) failed. Therefore we do not check the |
63 |
# be that a minor process (clone) failed. Therefore we do not check the |
66 |
# exit code. |
64 |
# exit code. |
67 |
if test -f "$segv_output"; then |
65 |
if test -s "$segv_output"; then |
68 |
# The program caught a signal. The output is in the file with the |
66 |
# The program caught a signal. The output is in the file with the |
69 |
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of |
67 |
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of |
70 |
# functions in shared objects are available, but names in the static |
68 |
# functions in shared objects are available, but names in the static |
Lines 101-107
Link Here
|
101 |
;; |
99 |
;; |
102 |
esac |
100 |
esac |
103 |
done) |
101 |
done) |
104 |
rm -f "$segv_output" |
|
|
105 |
fi |
102 |
fi |
|
|
103 |
rm -f "$segv_output" |
106 |
|
104 |
|
107 |
exit $exval |
105 |
exit $exval |