keith-turner commented on code in PR #5502:
URL: https://github.com/apache/accumulo/pull/5502#discussion_r2059099665
##########
assemble/bin/accumulo-service:
##########
@@ -148,9 +148,19 @@ function control_process() {
function find_processes() {
local service_type=$1
local file
- for file in "$ACCUMULO_PID_DIR"/*; do
- if file=$(expr "$file" : '^.*/accumulo-\('"$service_type"'.*\)[.]pid$');
then
- RUNNING_PROCESSES+=("$file")
+ local filepath
+ local expected_pid
+ local found_pid
+ for filepath in "$ACCUMULO_PID_DIR"/*; do
+ if file=$(expr "$filepath" :
'^.*/accumulo-\('"$service_type"'.*\)[.]pid$'); then
+ expected_pid=<("$filepath")
+ found_pid=$(pgrep -F "$filepath" -f "$file")
+ if [[ $found_pid != "$expected_pid" ]]; then
+ echo "failed pid in file: $filepath" >&2
Review Comment:
```suggestion
echo "removing stale pid file $filepath" >&2
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]