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 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9 9
10//usage:#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
11//usage:#define pidof_trivial_usage
12//usage: "[OPTIONS] [NAME]..."
13//usage:#define USAGE_PIDOF "\n\nOptions:"
14//usage:#else
15//usage:#define pidof_trivial_usage
16//usage: "[NAME]..."
17//usage:#define USAGE_PIDOF /* none */
18//usage:#endif
19//usage:#define pidof_full_usage "\n\n"
20//usage: "List PIDs of all processes with names that match NAMEs"
21//usage: USAGE_PIDOF
22//usage: IF_FEATURE_PIDOF_SINGLE(
23//usage: "\n -s Show only one PID"
24//usage: )
25//usage: IF_FEATURE_PIDOF_OMIT(
26//usage: "\n -o PID Omit given pid"
27//usage: "\n Use %PPID to omit pid of pidof's parent"
28//usage: )
29//usage:
30//usage:#define pidof_example_usage
31//usage: "$ pidof init\n"
32//usage: "1\n"
33//usage: IF_FEATURE_PIDOF_OMIT(
34//usage: "$ pidof /bin/sh\n20351 5973 5950\n")
35//usage: IF_FEATURE_PIDOF_OMIT(
36//usage: "$ pidof /bin/sh -o %PPID\n20351 5950")
37
10#include "libbb.h" 38#include "libbb.h"
11 39
12enum { 40enum {