Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUBRIDQA-1214] Update xkill #672

Merged
merged 5 commits into from
Apr 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CTP/shell/init_path/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ function xkill
if [ "$OS" == Windows_NT ]
then
win_svr_pid=`get_win_service_pid`
tw-kang marked this conversation as resolved.
Show resolved Hide resolved
for pid in `ps -W | grep "${strkill}" | awk '{print $1}'`
for pid in `ps -W | grep -w "${strkill}" | awk '{print $1}'`
do
is_in_white_list=0
for svr_id in ${win_svr_pid}
Expand All @@ -1088,9 +1088,9 @@ function xkill
else
if [ $fullCommand -eq 1 ]
then
pids=`ps -u $USER -o pid,command | grep "$strkill" | grep -v grep | awk '{print $1}'`
pids=`ps -u $USER -o pid,command | grep -w "$strkill" | grep -v grep | awk '{print $1}'`
else
pids=`ps -u $USER -o pid,comm | grep "$strkill" | grep -v grep | awk '{print $1}'`
pids=`ps -u $USER -o pid,comm | grep -w "$strkill" | grep -v grep | awk '{print $1}'`
fi

for pid in $pids
Expand Down
Loading