summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) = @_;