* Like rte_panic this terminates the application. However, no traceback is * provided and no core-dump is generated. */
| 29 | * provided and no core-dump is generated. |
| 30 | */ |
| 31 | void |
| 32 | rte_exit(int exit_code, const char *format, ...) |
| 33 | { |
| 34 | va_list ap; |
| 35 | |
| 36 | if (exit_code != 0) |
| 37 | RTE_LOG(CRIT, EAL, "Error - exiting with code: %d\n" |
| 38 | " Cause: ", exit_code); |
| 39 | |
| 40 | va_start(ap, format); |
| 41 | rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap); |
| 42 | va_end(ap); |
| 43 | |
| 44 | if (rte_eal_cleanup() != 0 && rte_errno != EALREADY) |
| 45 | RTE_LOG(CRIT, EAL, |
| 46 | "EAL could not release all resources\n"); |
| 47 | exit(exit_code); |
| 48 | } |