1303 files changed, 32187 insertions, 57138 deletions
diff --git a/miscutils/timeout.c b/miscutils/timeout.c index 9d56593..f29dc8a 100644 --- a/miscutils/timeout.c +++ b/miscutils/timeout.c @@ -27,6 +27,16 @@ * splitszf 12-05-2006 by Roberto A. Foglietta * rewrite 14-11-2008 vda */ +//config:config TIMEOUT +//config: bool "timeout" +//config: default y +//config: help +//config: Runs a program and watches it. If it does not terminate in +//config: specified number of seconds, it is sent a signal. + +//applet:IF_TIMEOUT(APPLET(timeout, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_TIMEOUT) += timeout.o //usage:#define timeout_trivial_usage //usage: "[-t SECS] [-s SIG] PROG ARGS" @@ -52,9 +62,8 @@ int timeout_main(int argc UNUSED_PARAM, char **argv) /* -p option is not documented, it is needed to support NOMMU. */ /* -t SECONDS; -p PARENT_PID */ - opt_complementary = "t+" USE_FOR_NOMMU(":p+"); /* '+': stop at first non-option */ - getopt32(argv, "+s:t:" USE_FOR_NOMMU("p:"), &opt_s, &timeout, &parent); + getopt32(argv, "+s:t:+" USE_FOR_NOMMU("p:+"), &opt_s, &timeout, &parent); /*argv += optind; - no, wait for bb_daemonize_or_rexec! */ signo = get_signum(opt_s); if (signo < 0) |