iv\_fatal(3) ivykis programmer's manual iv\_fatal(3)

# [NAME](#NAME)

iv\_fatal, iv\_set\_fatal\_msg\_handler - ivykis fatal error condition handling

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;iv.h&gt;**

**void iv\_fatal(const char \*fmt, ...);**  
**void iv\_set\_fatal\_msg\_handler(void (\*handler)(const char \*msg));**

# [DESCRIPTION](#DESCRIPTION)

**iv\_fatal** aborts the running program, after possibly emitting an error message. The **fmt** parameter is a [**printf**(3)](/man/os/ivykis/printf.3)-style format string, the message to be logged.

If no handler is set (the default), the formatted message will be sent to **syslog**, with critical severity. Otherwise the **handler** as set by **iv\_set\_fatal\_msg\_handler** will be used instead.

**iv\_fatal** is also used internally by ivykis, whenever a fatal situation is detected.

**iv\_set\_fatal\_msg\_handler** can be used to set an alternative (as opposed to **syslog**) function to call from **iv\_fatal**, and its argument should be a function that does not return, and takes a single string as argument - the formatted error message.

# [SEE ALSO](#SEE_ALSO)

[**ivykis**(3)](/man/os/ivykis/ivykis.3), [**iv\_examples**(3)](/man/os/ivykis/iv_examples.3)

2012-06-18 ivykis

---

Document: iv_fatal(3) from ivykis 0.43.2-r7 (Chainguard OS)
Source: https://github.com/buytenh/ivykis
