Defined by c11: https://en.cppreference.com/w/c/program/quick_exit https://en.cppreference.com/w/c/program/at_quick_exit Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This fixes a long standing issue, where the kernel does flushing of file streams, although it should not handle such streams at all.
For CONFIG_BUILD_KERNEL using the sched/task/task_exithook implementation will just not work. It calls user code with kernel privileges which is a bit of a security issue.