Otherwise kill flags don't work unless killall5 is also configured.

Also switch to the FLAG() macro.
---
 toys/posix/kill.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
From 0345ae4f7ca6586a7c06791095ee4c79048d1040 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Sat, 22 Jun 2019 09:05:17 -0700
Subject: [PATCH] Use FORCE_FLAGS in kill.c.

Otherwise kill flags don't work unless killall5 is also configured.

Also switch to the FLAG() macro.
---
 toys/posix/kill.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/toys/posix/kill.c b/toys/posix/kill.c
index ee68980b..c9de98ea 100644
--- a/toys/posix/kill.c
+++ b/toys/posix/kill.c
@@ -41,6 +41,7 @@ config KILLALL5
 
 // This has to match the filename:
 #define FOR_kill
+#define FORCE_FLAGS
 #include "toys.h"
 
 GLOBALS(
@@ -61,7 +62,7 @@ void kill_main(void)
   pid_t pid;
 
   // list signal(s)
-  if (toys.optflags & FLAG_l) {
+  if (FLAG(l)) {
     if (*args) {
       int signum = sig_to_num(*args);
       char *s = NULL;
@@ -94,7 +95,7 @@ void kill_main(void)
     long *olist = 0, ocount = 0;
 
     // parse omit list
-    if (toys.optflags & FLAG_o) {
+    if (FLAG(o)) {
       struct arg_list *ptr;
 
       for (ptr = TT.o; ptr; ptr = ptr->next) ocount++;
-- 
2.22.0.410.gd8fdbe21b5-goog

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to