2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

vlog: Add VLOG_ABORT() to log and call abort().

Whereas VLOG_FATAL() eventually calls exit(1), VLOG_ABORT()
eventually calls abort().  The key difference is that abort()
will cause a "monitor" process to restart, where exit(1) will
cause it to exit along with the monitored process.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2012-05-22 11:36:50 -07:00
parent e8087a87a3
commit d41d4b714d
4 changed files with 61 additions and 2 deletions

View File

@@ -199,9 +199,14 @@ ovs_abort(int err_no, const char *format, ...)
va_list args;
va_start(args, format);
ovs_error_valist(err_no, format, args);
va_end(args);
ovs_abort_valist(err_no, format, args);
}
/* Same as ovs_abort() except that the arguments are supplied as a va_list. */
void
ovs_abort_valist(int err_no, const char *format, va_list args)
{
ovs_error_valist(err_no, format, args);
abort();
}