summaryrefslogtreecommitdiff
path: root/libbb/error_msg_and_die.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-05-24 12:18:16 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-05-24 12:18:16 +0000
commitb055001b6a69cf8fd513d36622cf693ee20c0e92 (patch)
tree13b92d347774d453d227b2f29dee695974a8727d /libbb/error_msg_and_die.c
parent90e485ce79b8a0cd345bc5be76100291ec589579 (diff)
downloadbusybox-w32-b055001b6a69cf8fd513d36622cf693ee20c0e92.tar.gz
busybox-w32-b055001b6a69cf8fd513d36622cf693ee20c0e92.tar.bz2
busybox-w32-b055001b6a69cf8fd513d36622cf693ee20c0e92.zip
hush: fix handling of unmatched ${name (without closing '}') -
was eating all remaining input, potentially megabytes. nofork: save/restore die_jmp too nofork: use -2222 instead of -111 as "special" return valur for zero (-111 is used by some applets. -2222 won't fit in exitcode and thus safer)
Diffstat (limited to 'libbb/error_msg_and_die.c')
-rw-r--r--libbb/error_msg_and_die.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/error_msg_and_die.c b/libbb/error_msg_and_die.c
index 20d971591..0e99a03cf 100644
--- a/libbb/error_msg_and_die.c
+++ b/libbb/error_msg_and_die.c
@@ -27,9 +27,9 @@ void xfunc_die(void)
27 * p = xmalloc(10); 27 * p = xmalloc(10);
28 * q = xmalloc(10); // BUG! if this dies, we leak p! 28 * q = xmalloc(10); // BUG! if this dies, we leak p!
29 */ 29 */
30 /* -111 means "zero" (longjmp can't pass 0) 30 /* -2222 means "zero" (longjmp can't pass 0)
31 * spawn_and_wait() catches -111. */ 31 * run_nofork_applet() catches -2222. */
32 longjmp(die_jmp, xfunc_error_retval ? xfunc_error_retval : -111); 32 longjmp(die_jmp, xfunc_error_retval ? xfunc_error_retval : -2222);
33 } 33 }
34 sleep(die_sleep); 34 sleep(die_sleep);
35 } 35 }