From c8101a6f6a19d7697170dd1eb4464b7320f03d50 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 11 Oct 2007 13:58:59 +0000 Subject: - use time() to know when to timeout (when launching installer X server) since the loop may be slower than 1 second (xf86misc::main::Xtest takes time on a failing X server on i810). Also print a message telling user to wait after 8 seconds. --- perl-install/install/steps_gtk.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'perl-install/install/steps_gtk.pm') diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm index f0cea7f74..d0857b541 100644 --- a/perl-install/install/steps_gtk.pm +++ b/perl-install/install/steps_gtk.pm @@ -69,6 +69,7 @@ sub new($$) { log::l("$server still not running, trying again"); } my $nb; + my $start_time = time(); foreach (1..60) { log::l("waiting for the server to start ($_ $nb)"); log::l("Server died"), return 0 if !fuzzy_pidofs(qr/\b$server\b/); @@ -77,6 +78,8 @@ sub new($$) { log::l("AFAIK X server is up"); return 1; } + time() - $start_time < 60 or last; + time() - $start_time > 8 and print N("Xorg server is slow to start. Please wait..."), "\n"; sleep 1; } log::l("Timeout!!"); -- cgit v1.2.1