UPANIC(2) | System Calls | UPANIC(2) |
upanic
— user
process panic
#include
<upanic.h>
void noreturn
upanic
(const char *msg,
size_t len);
The
upanic
()
system call terminates the calling process and generates a core file in the
process, subject to the current core file settings as described in
core(5) and controlled by
coreadm(8).
Unlike abort(3C), signals are not generated, which avoids two related challenges:
SIGABRT
.The
upanic
()
system call allows an optional message to be transmitted that will be put in
a NT_UPANIC
elf note in the resulting core file. If
a message is not desired, then one should pass NULL
for msg. In general, it is expected that
msg is a character string with a human-readable
message; however, it may include binary data. The system will copy
len bytes regardless of whether the string has a NUL
character to terminate it or not. If msg points to an
invalid value or len is a size that is larger than the
system's internal maximum size, then the process will still terminate;
however, this will be noted in the NT_UPANIC
elf
note.
The
upanic
()
system call is illumos-specific and not portable to other systems. For
portable applications, instead use
abort(3C).
The upanic
() system call does not return.
It always terminates the process.
October 31, 2020 | OmniOS |