mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-05-03 06:20:55 -07:00
Print the value of errno when an internal error happened (J.Elsasser).
This commit is contained in:
parent
fb8eb86e72
commit
4ef223694e
1 changed files with 4 additions and 0 deletions
|
|
@ -29,7 +29,11 @@
|
|||
void
|
||||
ecl_internal_error(const char *s)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
printf("\nInternal or unrecoverable error in:\n%s\n", s);
|
||||
if (saved_errno) {
|
||||
printf(" [%d: %s]\n", saved_errno, strerror(saved_errno));
|
||||
}
|
||||
fflush(stdout);
|
||||
#ifdef SIGIOT
|
||||
signal(SIGIOT, SIG_DFL); /* avoid getting into a loop with abort */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue