summaryrefslogtreecommitdiff
path: root/agent/mibgroup/util_funcs/Exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'agent/mibgroup/util_funcs/Exit.c')
-rw-r--r--agent/mibgroup/util_funcs/Exit.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/agent/mibgroup/util_funcs/Exit.c b/agent/mibgroup/util_funcs/Exit.c
new file mode 100644
index 0000000..c848fd8
--- /dev/null
+++ b/agent/mibgroup/util_funcs/Exit.c
@@ -0,0 +1,23 @@
+/*
+ * Portions of this file are copyrighted by:
+ * Copyright Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms specified in the COPYING file
+ * distributed with the Net-SNMP package.
+ */
+
+#include <net-snmp/net-snmp-config.h>
+
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <net-snmp/library/snmp_logging.h>
+
+#include "Exit.h"
+
+void
+Exit(int var)
+{
+ snmp_log(LOG_ERR, "Server Exiting with code %d\n", var);
+ exit(var);
+}