Terminate with signal in case of an assert

Automated debugging is easier if the process terminates with a
signal instead of a regular `exit (code);` call, since in this
latter case the cause of error cannot be automatically backtraced.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss 2015-05-29 14:41:46 +02:00
parent a838461649
commit 6a607751bf

View File

@ -62,7 +62,14 @@ jerry_fatal (jerry_fatal_code_t code) /**< status code */
}
#endif /* !JERRY_NDEBUG */
exit (code);
if (code == ERR_FAILED_INTERNAL_ASSERTION)
{
abort ();
}
else
{
exit (code);
}
} /* jerry_fatal */
/**