diff --git a/sx b/sx index 54ff537..49220c8 100755 --- a/sx +++ b/sx @@ -12,7 +12,7 @@ cleanup() { # regardless of failure. set +o errexit - if test "$1" -a "$(ps -o comm= "$1")" = Xorg; then + if [ "$1" ] && [ "$(ps -o comm= "$1")" = Xorg ]; then kill "$1" # Send SIGKILL after 10 seconds if the xserver is taking too long to