Skip to content

Commit

Permalink
raise SIGABRT instead of exit 1
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy committed Dec 16, 2024
1 parent 677cdf0 commit 0c5ae37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion util/Report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <algorithm> // min
#include <cstdlib> // exit
#include <cstring> // strlen
#include <csignal> // signal

#include "Machine.hh"
#include "Error.hh"
Expand Down Expand Up @@ -299,7 +300,7 @@ Report::fileCritical(int /* id */,
printToBufferAppend(fmt, args);
printBufferLine();
va_end(args);
exit(1);
raise(SIGABRT);
}

////////////////////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion util/StringUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <cctype>
#include <cstdio>
#include <cstdlib> // exit
#include <csignal> // signal
#include <array>
#include <algorithm>

Expand Down Expand Up @@ -217,7 +218,7 @@ stringDeleteCheck(const char *str)
{
if (isTmpString(str)) {
printf("Critical error: stringDelete for tmp string.");
exit(1);
raise(SIGABRT);
}
}

Expand Down

0 comments on commit 0c5ae37

Please sign in to comment.