summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-10-11 13:58:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-10-11 13:58:59 +0000
commitc8101a6f6a19d7697170dd1eb4464b7320f03d50 (patch)
treea32a10c040a4d35b4bf58bc3e5d8d5811975da9f
parent06433fb51afcc28dfc85b61e817b35bed59dc55d (diff)
downloaddrakx-c8101a6f6a19d7697170dd1eb4464b7320f03d50.tar
drakx-c8101a6f6a19d7697170dd1eb4464b7320f03d50.tar.gz
drakx-c8101a6f6a19d7697170dd1eb4464b7320f03d50.tar.bz2
drakx-c8101a6f6a19d7697170dd1eb4464b7320f03d50.tar.xz
drakx-c8101a6f6a19d7697170dd1eb4464b7320f03d50.zip
- 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.
-rw-r--r--perl-install/install/NEWS5
-rw-r--r--perl-install/install/steps_gtk.pm3
2 files changed, 8 insertions, 0 deletions
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!!");