Skip to content

Commit

Permalink
WIP more abortsss
Browse files Browse the repository at this point in the history
  • Loading branch information
elliefm committed Jun 26, 2024
1 parent d21b200 commit 5ac6f9a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backup/backupd.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ EXPORTED void fatal(const char* s, int code)
prot_flush(backupd_out);
}
syslog(LOG_ERR, "Fatal error: %s", s);

if (code != EX_PROTOCOL && config_fatals_abort) abort();

shut_down(code);
}

Expand Down
3 changes: 3 additions & 0 deletions backup/ctl_backups.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ EXPORTED void fatal(const char *error, int code)
{
fprintf(stderr, "fatal error: %s\n", error);
cyrus_done();

if (code != EX_PROTOCOL && config_fatals_abort) abort();

exit(code);
}

Expand Down
3 changes: 3 additions & 0 deletions backup/cyr_backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ EXPORTED void fatal(const char *error, int code)
{
fprintf(stderr, "fatal error: %s\n", error);
cyrus_done();

if (code != EX_PROTOCOL && config_fatals_abort) abort();

exit(code);
}

Expand Down
3 changes: 3 additions & 0 deletions backup/restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ EXPORTED void fatal(const char *s, int code)
{
fprintf(stderr, "Fatal error: %s\n", s);
syslog(LOG_ERR, "Fatal error: %s", s);

if (code != EX_PROTOCOL && config_fatals_abort) abort();

exit(code);
}

Expand Down
3 changes: 3 additions & 0 deletions netnews/remotepurge.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ EXPORTED void fatal(const char *s, int code)
syslog(LOG_ERR, "fatal error: %s", s);
fprintf(stderr, "fatal error: %s\n", s);
}

if (code != EX_PROTOCOL && config_fatals_abort) abort();

exit(code);
}

Expand Down
2 changes: 2 additions & 0 deletions timsieved/timsieved.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ EXPORTED void fatal(const char *s, int code)
prot_printf(sieved_out, "NO Fatal error: %s\r\n", s);
prot_flush(sieved_out);

if (code != EX_PROTOCOL && config_fatals_abort) abort();

shut_down(EX_TEMPFAIL);
}

Expand Down

0 comments on commit 5ac6f9a

Please sign in to comment.