From 06089883acc83a33d308ee7fcc7fc7d3e48e1d89 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 16 Sep 2004 01:39:33 +0000 Subject: on a test here, a "Server died" occured whereas the server is running. i think it can occur if the server is in fact not even started. Trying to handle this case --- perl-install/install_steps_gtk.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 4cbe537f9..c1c9f33ba 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -61,9 +61,15 @@ sub new($$) { c::setsid(); exec $server, @options or c::_exit(1); } + + #- wait for the server to start + foreach (1..5) { + sleep 1; + last if fuzzy_pidofs(qr/\b$server\b/); + log::l("$server still not running, trying again"); + } my $nb; foreach (1..60) { - sleep 1; log::l("Server died"), return 0 if !fuzzy_pidofs(qr/\b$server\b/); $nb++ if xf86misc::main::Xtest($wanted_DISPLAY); if ($nb > 2) { #- one succeeded test is not enough :-( @@ -71,6 +77,7 @@ sub new($$) { log::l("AFAIK X server is up"); return 1; } + sleep 1; } log::l("Timeout!!"); 0; -- cgit v1.2.1