1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
13 #if ENABLE_FEATURE_PREFER_APPLETS || ENABLE_HUSH
20 if ((ENABLE_FEATURE_PREFER_APPLETS || ENABLE_HUSH)
23 /* Special case. We arrive here if NOFORK applet
24 * calls xfunc, which then decides to die.
25 * We don't die, but jump instead back to caller.
26 * NOFORK applets still cannot carelessly call xfuncs:
28 * q = xmalloc(10); // BUG! if this dies, we leak p!
30 /* -2222 means "zero" (longjmp can't pass 0)
31 * run_nofork_applet() catches -2222. */
32 longjmp(die_jmp, xfunc_error_retval ? xfunc_error_retval : -2222);
36 exit(xfunc_error_retval);
39 void bb_error_msg_and_die(const char *s, ...)
44 bb_verror_msg(s, p, NULL);