mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
16cd3c0619
There's really only one bug fix in here that should be significant for GNO hush. The other changes should be inconsequential, AFAIK.
26 lines
528 B
C
26 lines
528 B
C
/* 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.
|
|
*/
|
|
|
|
/* Keeping it separate allows to NOT pull in stdio for VERY small applets.
|
|
* Try building busybox with only "true" enabled... */
|
|
|
|
#include "libbb.h"
|
|
|
|
void (*die_func)(void);
|
|
|
|
void FAST_FUNC xfunc_die(void)
|
|
{
|
|
if (die_func)
|
|
die_func();
|
|
if (!is_forked_child())
|
|
exit(xfunc_error_retval);
|
|
else
|
|
_exit(xfunc_error_retval);
|
|
}
|