summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch')
-rw-r--r--meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
new file mode 100644
index 0000000000..2f5a217d3f
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
@@ -0,0 +1,35 @@
1From f5125725e4e2e250ccc78a17a8b77431100e7c15 Mon Sep 17 00:00:00 2001
2From: Armin kuster <akuster808@gmail.com>
3Date: Wed, 14 Oct 2020 22:48:31 -0700
4Subject: [PATCH] Busybox does not support ps -p so use pgrep
5
6Upstream-Status: Inappropriate [embedded specific]
7Based on changes from Diego Sueiro <Diego.Sueiro@arm.com>
8
9Signed-off-by: Armin kuster <akuster808@gmail.com>
10
11Refresh to apply on top of 2.6.1.
12
13Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
14---
15 src/bin/keactrl/keactrl.in | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in
19index cccfdac303..20ae2e6ec5 100644
20--- a/src/bin/keactrl/keactrl.in
21+++ b/src/bin/keactrl/keactrl.in
22@@ -146,8 +146,8 @@ check_running() {
23 # Get the PID from the PID file (if it exists)
24 get_pid_from_file "${proc_name}"
25 if [ ${_pid} -gt 0 ]; then
26- # Use ps to check if PID is alive
27- if ps -p ${_pid} 1>/dev/null; then
28+ # Use pgrep and grep to check if PID is alive
29+ if pgrep -v 1 | grep ${_pid} 1>/dev/null; then
30 # No error, so PID IS ALIVE
31 _running=1
32 fi
33--
342.39.2
35