mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 11:02:48 -05:00
Get rid of fatalbox() completely.
It's an incoherent concept! There should not be any such thing as an error box that terminates the entire program but is not modal. If it's bad enough to terminate the whole program, i.e. _all_ currently live connections, then there's no point in permitting progress to continue in windows other than the affected one, because all windows are affected anyway. So all previous uses of fatalbox() have become modalfatalbox(), except those which looked to me as if they shouldn't have been fatal in the first place, e.g. lingering pieces of error handling in winnet.c which ought to have had the severity of 'give up on this particular Socket and close it' rather than 'give up on the ENTIRE UNIVERSE'.
This commit is contained in:
@ -3705,18 +3705,6 @@ void nonfatal_message_box(void *window, const char *msg)
|
||||
FALSE, &buttons_ok);
|
||||
}
|
||||
|
||||
void fatalbox(const char *p, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *msg;
|
||||
va_start(ap, p);
|
||||
msg = dupvprintf(p, ap);
|
||||
va_end(ap);
|
||||
fatal_message_box(NULL, msg);
|
||||
sfree(msg);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
|
||||
void nonfatal(const char *p, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -23,16 +23,6 @@
|
||||
SockAddr unix_sock_addr(const char *path);
|
||||
Socket new_unix_listener(SockAddr listenaddr, Plug plug);
|
||||
|
||||
void fatalbox(const char *p, ...)
|
||||
{
|
||||
va_list ap;
|
||||
fprintf(stderr, "FATAL ERROR: ");
|
||||
va_start(ap, p);
|
||||
vfprintf(stderr, p, ap);
|
||||
va_end(ap);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
void modalfatalbox(const char *p, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -29,23 +29,6 @@ static void *logctx;
|
||||
|
||||
static struct termios orig_termios;
|
||||
|
||||
void fatalbox(const char *p, ...)
|
||||
{
|
||||
struct termios cf;
|
||||
va_list ap;
|
||||
premsg(&cf);
|
||||
fprintf(stderr, "FATAL ERROR: ");
|
||||
va_start(ap, p);
|
||||
vfprintf(stderr, p, ap);
|
||||
va_end(ap);
|
||||
fputc('\n', stderr);
|
||||
postmsg(&cf);
|
||||
if (logctx) {
|
||||
log_free(logctx);
|
||||
logctx = NULL;
|
||||
}
|
||||
cleanup_exit(1);
|
||||
}
|
||||
void modalfatalbox(const char *p, ...)
|
||||
{
|
||||
struct termios cf;
|
||||
|
Reference in New Issue
Block a user