Initial commit
[nyanbb.git] / lib / xfunc_die.c
blobd4b4a59adc9046695b65d652040915d99aa8357d
1 /* vi: set sw=4 ts=4: */
2 /*
3 * Utility routines.
5 * Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com>
7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */
9 #include <stdlib.h>
10 #include "bb/lib/public.h"
11 /* Keeping it separate allows to NOT pull in stdio for VERY small applets.
12 * Try building busybox with only "true" enabled... */
14 BB_STATIC void (*bb_die_func)(void);
16 BB_STATIC void bb_xfunc_die(void)
18 if (bb_die_func)
19 bb_die_func();
20 exit(bb_xfunc_error_retval);