1
1

general: prevent die() from getting recursed into

When something that is called from die() calls die() again,
there is nothing we can do any more but give up.

This would have prevented the spiralling as
seen in https://savannah.gnu.org/bugs/?60853.
Этот коммит содержится в:
Benno Schulenberg 2021-06-30 15:01:45 +02:00
родитель 8d1a666dcf
Коммит 177e4e5805

Просмотреть файл

@ -351,6 +351,11 @@ void die(const char *msg, ...)
{
va_list ap;
openfilestruct *firstone = openfile;
static int stabs = 0;
/* When dying for a second time, just give up. */
if (++stabs > 1)
exit(11);
restore_terminal();