From fe868f817b6be1dd8c0e8774b8a575dbcfbdc522 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 28 Jul 2002 21:47:05 +0000 Subject: (running_window_manager): return the pids found if wanted (ddcxinfos): ensure no probe is done when $::noauto --- perl-install/any.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-install/any.pm b/perl-install/any.pm index 47de00273..fe9c4605c 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1027,6 +1027,8 @@ You can use userdrake to add a user in this group.") } sub ddcxinfos { + return if $::noauto; + my @l = `$ENV{LD_LOADER} ddcxinfos`; if ($::isInstall && -e "/tmp/ddcxinfos") { my @l_old = cat_("/tmp/ddcxinfos"); @@ -1106,9 +1108,10 @@ sub running_window_manager { my @window_managers = qw(kwin gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm); foreach (@window_managers) { - return $_ if fuzzy_pidofs(qr/\b$_\b/); + my @pids = fuzzy_pidofs(qr/\b$_\b/) or next; + return wantarray ? ($_, @pids) : $_; } - ''; + undef; } sub ask_window_manager_to_logout { -- cgit v1.2.1