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/NEWS | 5 +++++ perl-install/install/steps_gtk.pm | 3 +++ 2 files changed, 8 insertions(+) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 20163ba6b..8d560911a 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,8 @@ +- 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. + Version 10.4.238 - 5 October 2007, by Pascal "Pixel" Rigaux - do not use pseudo Protocol "vboxmouse" during install, use "IMPS/2" instead 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