From d09c3d37337cf7f73efa16bb25d772c008db77f5 Mon Sep 17 00:00:00 2001 From: Daouda Lo Date: Thu, 26 May 2005 06:19:49 +0000 Subject: - set USER env var when lost --- mdkonline.pm | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.1