aboutsummaryrefslogtreecommitdiff
path: root/procps/pidof.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/pidof.c')
-rw-r--r--procps/pidof.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/procps/pidof.c b/procps/pidof.c
index 49e469ca5..e102a31c6 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -7,6 +7,34 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
+//usage:#define pidof_trivial_usage
+//usage: "[OPTIONS] [NAME]..."
+//usage:#define USAGE_PIDOF "\n\nOptions:"
+//usage:#else
+//usage:#define pidof_trivial_usage
+//usage: "[NAME]..."
+//usage:#define USAGE_PIDOF /* none */
+//usage:#endif
+//usage:#define pidof_full_usage "\n\n"
+//usage: "List PIDs of all processes with names that match NAMEs"
+//usage: USAGE_PIDOF
+//usage: IF_FEATURE_PIDOF_SINGLE(
+//usage: "\n -s Show only one PID"
+//usage: )
+//usage: IF_FEATURE_PIDOF_OMIT(
+//usage: "\n -o PID Omit given pid"
+//usage: "\n Use %PPID to omit pid of pidof's parent"
+//usage: )
+//usage:
+//usage:#define pidof_example_usage
+//usage: "$ pidof init\n"
+//usage: "1\n"
+//usage: IF_FEATURE_PIDOF_OMIT(
+//usage: "$ pidof /bin/sh\n20351 5973 5950\n")
+//usage: IF_FEATURE_PIDOF_OMIT(
+//usage: "$ pidof /bin/sh -o %PPID\n20351 5950")
+
#include "libbb.h"
enum {