I added Ihar's Ack and my Ack to both patches and pushed them to main,
branch-22.06, branch-22.03, and branch-21.12.
On 6/8/22 09:29, Terry Wilson wrote:
Since pids can be re-used, it is necessary to check that the
process that is running with a pid matches the one that we expect.
This adds the ability to optionally pass a 'binary' argument to
pidfile_is_running, and if it is passed to match the binary against
/proc/$pid/exe.
Signed-off-by: Terry Wilson <[email protected]>
---
utilities/ovn-ctl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl
index d733aa42d..14d37a3d6 100755
--- a/utilities/ovn-ctl
+++ b/utilities/ovn-ctl
@@ -42,7 +42,8 @@ ovn_ic_db_conf_file="$ovn_etcdir/ovn-ic-db-params.conf"
pidfile_is_running () {
pidfile=$1
- test -e "$pidfile" && [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists
"$pid"
+ cmd=$2
+ test -e "$pidfile" && [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z
$cmd -o pid_comm_check "$cmd" "$pid" ]
} >/dev/null 2>&1
stop_nb_ovsdb() {
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev