diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-05-26 06:17:36 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-05-26 06:17:36 +0000 |
commit | e560ece647bbb921feb74206ba3d1335f8c8bad3 (patch) | |
tree | 60cb43e1c28f2999b608db5bf08c8953b5f17254 | |
parent | ae734f60723c3d04dfa35f0d2858e32bd0cec00c (diff) | |
download | mgaonline-e560ece647bbb921feb74206ba3d1335f8c8bad3.tar mgaonline-e560ece647bbb921feb74206ba3d1335f8c8bad3.tar.gz mgaonline-e560ece647bbb921feb74206ba3d1335f8c8bad3.tar.bz2 mgaonline-e560ece647bbb921feb74206ba3d1335f8c8bad3.tar.xz mgaonline-e560ece647bbb921feb74206ba3d1335f8c8bad3.zip |
- reget USER env var when lost
-rw-r--r-- | mdkonline.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mdkonline.pm b/mdkonline.pm index b1394198..5cc9821c 100644 --- a/mdkonline.pm +++ b/mdkonline.pm @@ -224,6 +224,8 @@ LASTCHECK=$d sub is_running { my ($name) = @_; + # Set USER environment variable if necessary: + $ENV{USER} ||= getlogin || (getpwuid($<))[0]; any { my ($ppid, $pid, $n) = /^\s*(\d+)\s+(\d+)\s+(.*)/; #- to run ps, perl may create some process with $name as name and 1 as ppid |