1303 files changed, 32187 insertions, 57138 deletions
diff --git a/procps/pidof.c b/procps/pidof.c index 6d7b591..069adb7 100644 --- a/procps/pidof.c +++ b/procps/pidof.c @@ -6,6 +6,32 @@ * * Licensed under GPLv2, see file LICENSE in this source tree. */ +//config:config PIDOF +//config: bool "pidof" +//config: default y +//config: help +//config: Pidof finds the process id's (pids) of the named programs. It prints +//config: those id's on the standard output. +//config: +//config:config FEATURE_PIDOF_SINGLE +//config: bool "Enable argument for single shot (-s)" +//config: default y +//config: depends on PIDOF +//config: help +//config: Support argument '-s' for returning only the first pid found. +//config: +//config:config FEATURE_PIDOF_OMIT +//config: bool "Enable argument for omitting pids (-o)" +//config: default y +//config: depends on PIDOF +//config: help +//config: Support argument '-o' for omitting the given pids in output. +//config: The special pid %PPID can be used to name the parent process +//config: of the pidof, in other words the calling shell or shell script. + +//applet:IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_PIDOF) += pidof.o //usage:#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) //usage:#define pidof_trivial_usage @@ -51,13 +77,12 @@ int pidof_main(int argc UNUSED_PARAM, char **argv) unsigned opt; #if ENABLE_FEATURE_PIDOF_OMIT llist_t *omits = NULL; /* list of pids to omit */ - opt_complementary = "o::"; #endif /* do unconditional option parsing */ opt = getopt32(argv, "" IF_FEATURE_PIDOF_SINGLE ("s") - IF_FEATURE_PIDOF_OMIT("o:", &omits)); + IF_FEATURE_PIDOF_OMIT("o:*", &omits)); #if ENABLE_FEATURE_PIDOF_OMIT /* fill omit list. */ |