aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb
diff options
context:
space:
mode:
Diffstat (limited to 'toys/lsb')
-rw-r--r--toys/lsb/killall.c2
-rw-r--r--toys/lsb/pidof.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/toys/lsb/killall.c b/toys/lsb/killall.c
index 47aea23d..c81360b1 100644
--- a/toys/lsb/killall.c
+++ b/toys/lsb/killall.c
@@ -89,7 +89,7 @@ void killall_main(void)
TT.err = xmalloc(2*toys.optc);
for (i=0; i<toys.optc; i++) TT.err[i] = ESRCH;
- names_to_pid(TT.names, kill_process);
+ names_to_pid(TT.names, kill_process, 1);
for (i=0; i<toys.optc; i++) {
if (TT.err[i]) {
toys.exitval = 1;
diff --git a/toys/lsb/pidof.c b/toys/lsb/pidof.c
index 4f266b84..cd705a7c 100644
--- a/toys/lsb/pidof.c
+++ b/toys/lsb/pidof.c
@@ -5,7 +5,7 @@
*
* http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/pidof.html
-USE_PIDOF(NEWTOY(pidof, "<1so:", TOYFLAG_BIN))
+USE_PIDOF(NEWTOY(pidof, "<1so:x", TOYFLAG_BIN))
config PIDOF
bool "pidof"
@@ -17,6 +17,7 @@ config PIDOF
-s Single shot, only return one pid
-o Omit PID(s)
+ -x Match shell scripts too
*/
#define FOR_pidof
@@ -39,6 +40,6 @@ static int print_pid(pid_t pid, char *name)
void pidof_main(void)
{
toys.exitval = 1;
- names_to_pid(toys.optargs, print_pid);
+ names_to_pid(toys.optargs, print_pid, FLAG(x));
if (!toys.exitval) xputc('\n');
}