about summary refs log tree commit diff
path: root/src/testsuite/getpid.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/testsuite/getpid.sh')
-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 465def64..85059142 100755
--- a/src/testsuite/getpid.sh
+++ b/src/testsuite/getpid.sh
@@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then
 		*)
 			PGREP_FLAGS=""
 	esac
-	exec /usr/bin/pgrep $PGREP_FLAGS -n -u "$LOGNAME" "$1"
+	exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
 fi
 
 # pidof(1) could be a good alternative on elder Linux systems