Skip to content

Commit a0f779c

Browse files
committed
Replace the non-standard function syntax in pidkiller(), remove the
non-POSIX disown usage, and quote variables passed to test and kill. These changes address ShellCheck warnings without changing the current runtime flow or behavior. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent 96feafd commit a0f779c

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Runner/utils/platform.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,14 @@
66
# Detect Android userland
77
ANDROID_PATH=/system/build.prop
88
if [ -f $ANDROID_PATH ]; then
9-
ANDROID=1
109
# shellcheck disable=SC2209,SC2034
1110
SHELL_CMD=sh
1211
else
13-
ANDROID=0
1412
# shellcheck disable=SC2209,SC2034
1513
SHELL_CMD=bash
1614
fi
1715

18-
function pidkiller()
16+
pidkiller()
1917
{
20-
if [ $ANDROID -eq 0 ]; then
21-
disown $1
22-
fi
23-
kill -9 $1 >/dev/null 2>&1
18+
kill -9 "$1" >/dev/null 2>&1
2419
}

0 commit comments

Comments
 (0)