… | |
… | |
90 | } |
90 | } |
91 | |
91 | |
92 | void fatal (const char *m) |
92 | void fatal (const char *m) |
93 | { |
93 | { |
94 | slog (L_CRIT, m); |
94 | slog (L_CRIT, m); |
95 | exit (1); |
95 | exit (EXIT_FAILURE); |
96 | } |
96 | } |
97 | |
97 | |
|
|
98 | extern void require_failed (const char *file, int line, const char *info) |
|
|
99 | { |
|
|
100 | slog (L_CRIT, "FATAL: This program encountered a SHOULD NOT HAPPEN condition and will exit:"); |
|
|
101 | slog (L_CRIT, "FATAL+ %s:%d '%s' is false", file, line, info); |
|
|
102 | slog (L_CRIT, "FATAL+ This might indicates a bug in this program, a bug in your libraries,"); |
|
|
103 | slog (L_CRIT, "FATAL+ your system setup or operating system. Or it might indicate a very"); |
|
|
104 | slog (L_CRIT, "FATAL+ unusual, unanticipated operating condition, library version mismatch"); |
|
|
105 | slog (L_CRIT, "FATAL+ or similar problem. If it's not obvious to you what was causing it,"); |
|
|
106 | slog (L_CRIT, "FATAL+ then please report this to the program author(s)."); |
|
|
107 | exit (126); |
|
|
108 | } |
|
|
109 | |