pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>
This commit is contained in:
@ -251,11 +251,13 @@ USE_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
|
||||
USE_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER))
|
||||
USE_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE))
|
||||
USE_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER))
|
||||
USE_PIPE_PROGRESS(APPLET_NOUSAGE(pipe_progress, pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER))
|
||||
USE_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
||||
USE_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill))
|
||||
USE_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff))
|
||||
USE_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER))
|
||||
USE_PRINTF(APPLET(printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
|
@ -787,6 +787,7 @@ int bb_make_directory(char *path, long mode, int flags);
|
||||
|
||||
int get_signum(const char *name);
|
||||
const char *get_signame(int number);
|
||||
void print_signames_and_exit(void) ATTRIBUTE_NORETURN;
|
||||
|
||||
char *bb_simplify_path(const char *path);
|
||||
|
||||
@ -973,7 +974,8 @@ enum {
|
||||
PSSCAN_UTIME = 1 << 13,
|
||||
PSSCAN_TTY = 1 << 14,
|
||||
PSSCAN_SMAPS = (1 << 15) * ENABLE_FEATURE_TOPMEM,
|
||||
USE_SELINUX(PSSCAN_CONTEXT = 1 << 16,)
|
||||
PSSCAN_ARGVN = (1 << 16) * (ENABLE_PGREP | ENABLE_PKILL),
|
||||
USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
|
||||
/* These are all retrieved from proc/NN/stat in one go: */
|
||||
PSSCAN_STAT = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID
|
||||
| PSSCAN_COMM | PSSCAN_STATE
|
||||
|
@ -2558,6 +2558,18 @@
|
||||
"$ patch -p1 < example.diff\n" \
|
||||
"$ patch -p0 -i example.diff"
|
||||
|
||||
#define pgrep_trivial_usage \
|
||||
"[-flnovx] pattern"
|
||||
#define pgrep_full_usage \
|
||||
"Display process(es) selected by regex pattern" \
|
||||
"\n\nOptions:\n" \
|
||||
" -l Show command name too\n" \
|
||||
" -f Match against entire command line\n" \
|
||||
" -n Signal the newest process only\n" \
|
||||
" -o Signal the oldest process only\n" \
|
||||
" -v Negate the matching\n" \
|
||||
" -x Match whole name (not substring)"
|
||||
|
||||
#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
|
||||
#define USAGE_PIDOF "Options:"
|
||||
#else
|
||||
@ -2640,6 +2652,18 @@
|
||||
"Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
|
||||
"the new root file system"
|
||||
|
||||
#define pkill_trivial_usage \
|
||||
"[-l] | [-fnovx] [-signal] pattern"
|
||||
#define pkill_full_usage \
|
||||
"Send a signal to process(es) selected by regex pattern" \
|
||||
"\n\nOptions:\n" \
|
||||
" -l List all signals\n" \
|
||||
" -f Match against entire command line\n" \
|
||||
" -n Signal the newest process only\n" \
|
||||
" -o Signal the oldest process only\n" \
|
||||
" -v Negate the matching\n" \
|
||||
" -x Match whole name (not substring)"
|
||||
|
||||
#define poweroff_trivial_usage \
|
||||
"[-d delay] [-n] [-f]"
|
||||
#define poweroff_full_usage \
|
||||
|
Reference in New Issue
Block a user