tests: Remove grep process entries from pidgrep
Problem: We were picking process with lowest pid from ps|grep result. However, lowest pid need not be oldest process as recycling of PIDs can take place. Solution: Removed grep process entries from ps entries using grep -v grep. Change-Id: I2b9687a05a34cf6358f773183770d69a3fb9eb10 BUG: 858488 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/4765 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
This commit is contained in:
parent
dcf3ecd3c0
commit
fff8008c6c
@ -7,7 +7,7 @@ cleanup;
|
||||
|
||||
function pidgrep()
|
||||
{
|
||||
ps ax | grep "$1" | awk '{print $1}' | head -1
|
||||
ps ax | grep "$1" | grep -v grep | awk '{print $1}' | head -1
|
||||
}
|
||||
|
||||
## Start glusterd
|
||||
|
Loading…
x
Reference in New Issue
Block a user