3
0

xfunc_die.c 457 B

12345678910111213141516171819202122
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Utility routines.
  4. *
  5. * Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com>
  6. *
  7. * Licensed under GPLv2, see file LICENSE in this source tree.
  8. */
  9. /* Keeping it separate allows to NOT pull in stdio for VERY small applets.
  10. * Try building busybox with only "true" enabled... */
  11. #include "libbb.h"
  12. void (*die_func)(void);
  13. void FAST_FUNC xfunc_die(void)
  14. {
  15. if (die_func)
  16. die_func();
  17. exit(xfunc_error_retval);
  18. }