From 3f3aa2a57dc648ade9083f3b3ad83cce8206b912 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 9 Apr 2007 21:35:07 +0000 Subject: make xfunctions optionally longjump instead of exit. use it for making NOFORK more practical. touch: make it a NOFORK applet --- include/applets.h | 2 +- include/libbb.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/applets.h b/include/applets.h index 013903851..ecce32169 100644 --- a/include/applets.h +++ b/include/applets.h @@ -319,7 +319,7 @@ USE_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) #endif USE_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) USE_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -USE_TOUCH(APPLET_NOEXEC(touch, touch, _BB_DIR_BIN, _BB_SUID_NEVER, touch)) +USE_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_NEVER, touch)) USE_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) USE_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) USE_TRUE(APPLET(true, _BB_DIR_BIN, _BB_SUID_NEVER)) diff --git a/include/libbb.h b/include/libbb.h index cec31a7f4..8e3f4023c 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -620,6 +620,7 @@ extern const char *msg_eol; extern smallint logmode; extern int die_sleep; extern int xfunc_error_retval; +extern jmp_buf die_jmp; extern void sleep_and_die(void) ATTRIBUTE_NORETURN; extern void bb_show_usage(void) ATTRIBUTE_NORETURN ATTRIBUTE_EXTERNALLY_VISIBLE; extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); -- cgit v1.2.3