You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
running_in_background() {
|
|
pid="$1"
|
|
|
|
case "$("$PS" -o stat= -p "$pid" 2>/dev/null || echo '+')" in
|
|
*+*) ;;
|
|
*) return 0 ;;
|
|
esac
|
|
|
|
return 1
|
|
}
|
|
|
|
PS="${PS:-ps}"
|
|
|
|
running_in_background "$@"
|