diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-09-26 12:30:52 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-09-26 12:30:52 +0000 |
commit | 5c31e9f52c3891f571ef91a88a8cb156d482c2c4 (patch) | |
tree | 9f81f545369d4f0cd01a45614bc77cb4b5c56fd7 | |
parent | 31e6dcdb82e218b7ba1eb35c26261043d215b559 (diff) | |
download | drakx-5c31e9f52c3891f571ef91a88a8cb156d482c2c4.tar drakx-5c31e9f52c3891f571ef91a88a8cb156d482c2c4.tar.gz drakx-5c31e9f52c3891f571ef91a88a8cb156d482c2c4.tar.bz2 drakx-5c31e9f52c3891f571ef91a88a8cb156d482c2c4.tar.xz drakx-5c31e9f52c3891f571ef91a88a8cb156d482c2c4.zip |
fix again running processes detection
-rw-r--r-- | perl-install/standalone/net_applet | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 9bcc3bd3e..01abf659c 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -84,7 +84,11 @@ ugtk2::exit(0); 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 shouldStart() { my %p = getVarsFromSh($onstartupfile); |