bugfix tty grab

This commit is contained in:
Poil 2012-08-14 10:36:36 +02:00 committed by nojhan
parent 0125ee0cef
commit 6bffd34543

View File

@ -283,7 +283,7 @@ _lp_user()
_lp_connection()
{
local THIS_TTY
THIS_TTY=$(awk -v pid=$$ '$0 ~ pid && /${WORKING_SHELL}/{ print $7 }' < <(ps aux) )
THIS_TTY=$(awk -v pid=$$ -v wkshell=${_LP_WORKING_SHELL} '$0 ~ pid && $0 ~ wkshell { print $7 }' < <(ps aux) )
local SESS_SRC
SESS_SRC=$(who | awk -v thistty="$THIS_TTY" '$0 ~ thistty { print $6 }')