diff options
author | Daouda Lo <daouda@mandriva.com> | 2004-09-27 07:36:35 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2004-09-27 07:36:35 +0000 |
commit | 006e6d40d8d4a91a9e1a67b17211f0c072747533 (patch) | |
tree | 8f5cd5d260c268adefdd3f305b5e09a93fda0ecd /mdkapplet | |
parent | 11cf3f9b170693ec635c5f405c07acd19568358c (diff) | |
download | mgaonline-006e6d40d8d4a91a9e1a67b17211f0c072747533.tar mgaonline-006e6d40d8d4a91a9e1a67b17211f0c072747533.tar.gz mgaonline-006e6d40d8d4a91a9e1a67b17211f0c072747533.tar.bz2 mgaonline-006e6d40d8d4a91a9e1a67b17211f0c072747533.tar.xz mgaonline-006e6d40d8d4a91a9e1a67b17211f0c072747533.zip |
- new process check before launching duplicate
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) = @_; |