Use OSTYPE instead of uname whenever possible for better speed. (#5496)

This commit is contained in:
Hong
2016-10-10 13:24:30 -07:00
committed by Marc Cornellà
parent 98cd3973d2
commit a56eac7a71
6 changed files with 9 additions and 9 deletions

View File

@@ -10,8 +10,8 @@ integer cygwin=0
local IFS="
"
case "$(uname)" in
CYGWIN*) list=( `command ps -Wa` ); cygwin=1 ;;
case "$OSTYPE" in
cygwin*) list=( `command ps -Wa` ); cygwin=1 ;;
*) list=( `command ps -o pid,uid,command -A` ) ;;
esac

View File

@@ -42,8 +42,8 @@ NLIST_NONSELECTABLE_ELEMENTS=( 1 )
type ps 2>/dev/null 1>&2 || { echo >&2 "Error: \`ps' not found"; return 1 }
case "$(uname)" in
CYGWIN*) list=( `command ps -Wa` ) ;;
case "$OSTYPE" in
cygwin*) list=( `command ps -Wa` ) ;;
*) list=( `command ps -o pid,uid,command -A` ) ;;
esac