about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/testsuite/getpid.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh
index 3cc186e1..7a3dbe37 100755
--- a/src/testsuite/getpid.sh
+++ b/src/testsuite/getpid.sh
@@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then
 		*)
 			PGREP_FLAGS=""
 	esac
-	if [ -n "$LOGNAME" ] || [ -n "$USER" ]; then
+	if [ -n "${LOGNAME:-}" ] || [ -n "${USER:-}" ]; then
 		# Try to narrow the search down to the current user ...
 		exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
 	else