diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-05-26 06:19:49 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-05-26 06:19:49 +0000 |
commit | d09c3d37337cf7f73efa16bb25d772c008db77f5 (patch) | |
tree | ea97d853b1c6edc15b1e7f20ca1af3bd89078438 /mdkonline.pm | |
parent | 82b2a15f1d610f2252e39132853250f982bcba2f (diff) | |
download | mgaonline-d09c3d37337cf7f73efa16bb25d772c008db77f5.tar mgaonline-d09c3d37337cf7f73efa16bb25d772c008db77f5.tar.gz mgaonline-d09c3d37337cf7f73efa16bb25d772c008db77f5.tar.bz2 mgaonline-d09c3d37337cf7f73efa16bb25d772c008db77f5.tar.xz mgaonline-d09c3d37337cf7f73efa16bb25d772c008db77f5.zip |
- set USER env var when lost
Diffstat (limited to 'mdkonline.pm')
-rw-r--r-- | mdkonline.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mdkonline.pm b/mdkonline.pm index 1f73ecab..845fd256 100644 --- a/mdkonline.pm +++ b/mdkonline.pm @@ -211,6 +211,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 |