summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2004-09-27 07:36:35 +0000
committerDaouda Lo <daouda@mandriva.com>2004-09-27 07:36:35 +0000
commit006e6d40d8d4a91a9e1a67b17211f0c072747533 (patch)
tree8f5cd5d260c268adefdd3f305b5e09a93fda0ecd /mdkapplet
parent11cf3f9b170693ec635c5f405c07acd19568358c (diff)
downloadmgaonline-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-xmdkapplet6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index 83269ed2..79138a5b 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -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) = @_;