DomGarguilo commented on code in PR #312:
URL: https://github.com/apache/accumulo-fluo-uno/pull/312#discussion_r2955370024
##########
bin/impl/commands.sh:
##########
@@ -272,7 +272,7 @@ EOF
}
function uno_status_main() {
- atmp="$(pgrep -f accumulo\\.start -a | awk '{pid =
$1;for(i=1;i<=NF;i++)if($i=="org.apache.accumulo.start.Main")print $(i+1)
"("pid")"}' | tr '\n' ' ')"
+ atmp="$(pgrep -f accumulo\\.start -a | awk '{pid =
$1;for(i=1;i<=NF;i++)if($i=="org.apache.accumulo.start.Main"){name=$(i+1);if(name=="proc")name=$(i+2);if(name!="")print
name "("pid")"}}' | tr '\n' ' ')"
Review Comment:
Its probably not needed but I added it just in case a malformed command line
is found. If for some reason there is nothing after
`org.apache.accumulo.start.Main` or nothing after
`org.apache.accumulo.start.Main proc` this will fail a bit more gracefully.
Again, I'm not sure how this might happen I just added it as an extra guard.
--
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]