Lines 439-444
Link Here
|
439 |
terminate(code); |
439 |
terminate(code); |
440 |
} |
440 |
} |
441 |
|
441 |
|
|
|
442 |
/* As above, but does not call terminate. This is for functions which |
443 |
need to handle termination themselves, such as terminate(). */ |
444 |
|
445 |
void |
446 |
fatal_no_terminate(int code, const char *fmt, ...) |
447 |
{ |
448 |
va_list args; |
449 |
|
450 |
va_start(args, fmt); |
451 |
vfmtmsg(line, sizeof(line), fmt, args); |
452 |
if (to_log) |
453 |
syslog(LOG_ERR, "%s", line); |
454 |
if (to_stderr) |
455 |
fprintf(stderr, "%s\n", line); |
456 |
} |
457 |
|
442 |
int alarmed = 0; |
458 |
int alarmed = 0; |
443 |
|
459 |
|
444 |
SIGTYPE sigalrm(int signo __unused) |
460 |
SIGTYPE sigalrm(int signo __unused) |
Lines 547-554
Link Here
|
547 |
|
563 |
|
548 |
#if defined(get_term_param) |
564 |
#if defined(get_term_param) |
549 |
if (have_tty_parameters) { |
565 |
if (have_tty_parameters) { |
550 |
if (set_term_param (&saved_tty_parameters) < 0) |
566 |
if (set_term_param (&saved_tty_parameters) < 0) { |
551 |
fatal(2, "Can't restore terminal parameters: %m"); |
567 |
fatal_no_terminate(2, "Can't restore terminal parameters: %m"); |
|
|
568 |
status = 2; |
569 |
} |
552 |
} |
570 |
} |
553 |
#endif |
571 |
#endif |