blob: 25b99066df3e46e47b719b99e17e1136382c65f2 [file] [log] [blame]
Denis Vlasenko0edbdd82008-04-01 17:43:03 +00001/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com>
6 *
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02007 * Licensed under GPLv2, see file LICENSE in this source tree.
Denis Vlasenko0edbdd82008-04-01 17:43:03 +00008 */
Denys Vlasenkoebe6d9d2017-10-05 14:40:24 +02009#include "libbb.h"
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000010
Denys Vlasenko550bf5b2015-10-09 16:42:57 +020011/* Keeping it separate allows to NOT pull in stdio for VERY small applets.
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000012 * Try building busybox with only "true" enabled... */
13
Denys Vlasenko550bf5b2015-10-09 16:42:57 +020014void (*die_func)(void);
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000015
Denis Vlasenkodefc1ea2008-06-27 02:52:20 +000016void FAST_FUNC xfunc_die(void)
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000017{
Denys Vlasenko550bf5b2015-10-09 16:42:57 +020018 if (die_func)
19 die_func();
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000020 exit(xfunc_error_retval);
21}