hush: begin fixing non-functional job control

This commit is contained in:
Denis Vlasenko
2007-04-21 00:03:36 +00:00
parent 5f786c24e4
commit 54e7ffb3a4
3 changed files with 208 additions and 74 deletions

View File

@@ -10,14 +10,16 @@
#include "libbb.h"
int die_sleep;
#if ENABLE_FEATURE_PREFER_APPLETS
#if ENABLE_FEATURE_PREFER_APPLETS || ENABLE_HUSH
jmp_buf die_jmp;
#endif
void xfunc_die(void)
{
if (die_sleep) {
if (ENABLE_FEATURE_PREFER_APPLETS && die_sleep < 0) {
if ((ENABLE_FEATURE_PREFER_APPLETS || ENABLE_HUSH)
&& die_sleep < 0
) {
/* Special case. We arrive here if NOFORK applet
* calls xfunc, which then decides to die.
* We don't die, but jump instead back to caller.