aboutsummaryrefslogtreecommitdiff
path: root/libbb/xfunc_die.c
blob: 25b99066df3e46e47b719b99e17e1136382c65f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* vi: set sw=4 ts=4: */
/*
 * Utility routines.
 *
 * Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com>
 *
 * Licensed under GPLv2, see file LICENSE in this source tree.
 */
#include "libbb.h"

/* Keeping it separate allows to NOT pull in stdio for VERY small applets.
 * Try building busybox with only "true" enabled... */

void (*die_func)(void);

void FAST_FUNC xfunc_die(void)
{
	if (die_func)
		die_func();
	exit(xfunc_error_retval);
}