summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-10-09 22:31:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-10-09 22:31:57 +0000
commitf4e8b70aa49290da942c1fd44fd5fb949f445f51 (patch)
treec2c0093f8a4777e7bc1551832c131236da05636c /perl-install/install_steps_gtk.pm
parentced1c25aff3f377d46dbf80e6f67a7ed11f56f6e (diff)
downloaddrakx-backup-do-not-use-f4e8b70aa49290da942c1fd44fd5fb949f445f51.tar
drakx-backup-do-not-use-f4e8b70aa49290da942c1fd44fd5fb949f445f51.tar.gz
drakx-backup-do-not-use-f4e8b70aa49290da942c1fd44fd5fb949f445f51.tar.bz2
drakx-backup-do-not-use-f4e8b70aa49290da942c1fd44fd5fb949f445f51.tar.xz
drakx-backup-do-not-use-f4e8b70aa49290da942c1fd44fd5fb949f445f51.zip
setsid trick to make XF4 work in fbdev (!?!)
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 1596a7572..c32882cc5 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -46,7 +46,6 @@ sub new($$) {
install_gtk::createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{mouse}{wacom}[0], $Driver);
mkdir '/var/log' if !-d '/var/log';
- local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 };
my @options = (
if_(arch() !~ /^sparc/ && arch() ne 'ppc' && $server ne 'Xnest',
@@ -58,14 +57,18 @@ sub new($$) {
push @options, '-fp', '/usr/X11R6/lib/X11/fonts:unscaled' if $server =~ /Xsun|Xpmac/;
push @options, '-ac', '-geometry', $o->{vga16} ? '640x480' : '800x600' if $server eq 'Xnest';
- unless (fork()) {
+ if (!fork()) {
+ c::setsid();
exec $server, @options or exit 1;
}
+ my $nb;
foreach (1..60) {
sleep 1;
- log::l("Server died"), return 0 if !$ok;
- if (c::Xtest($wanted_DISPLAY)) {
+ log::l("Server died"), return 0 if !fuzzy_pidofs(qr/\b$server\b/);
+ $nb++ if c::Xtest($wanted_DISPLAY);
+ if ($nb > 2) { #- one succeeded test is not enough :-(
$ugtk2::force_focus = 1;
+ log::l("AFAIK X server is up");
return 1;
}
}