diff options
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -278,7 +278,11 @@ sub compareWithInstalled { } sub is_running { my ($name) = @_; - any { !/^\s*$$\b/ && /\b\Q$name\E$/ } `ps -u $ENV{USER}`; + 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 + $ppid ne 1 && $pid ne $$ && $n eq $name; + } `ps -o '%P %p %c' -u $ENV{USER}`; } sub rpmverparse { my ($ver) = @_; |