diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-10-23 10:07:01 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-10-23 10:07:01 +0000 |
commit | a8f5fcc9b9597beb0672f54301fcf59ee51c65c0 (patch) | |
tree | ca4cded8872e95c34c2b5d95153a99029f161dbc /perl-install | |
parent | 60556652731c7e14722c5fac8a971c4aa1109ab9 (diff) | |
download | drakx-backup-do-not-use-a8f5fcc9b9597beb0672f54301fcf59ee51c65c0.tar drakx-backup-do-not-use-a8f5fcc9b9597beb0672f54301fcf59ee51c65c0.tar.gz drakx-backup-do-not-use-a8f5fcc9b9597beb0672f54301fcf59ee51c65c0.tar.bz2 drakx-backup-do-not-use-a8f5fcc9b9597beb0672f54301fcf59ee51c65c0.tar.xz drakx-backup-do-not-use-a8f5fcc9b9597beb0672f54301fcf59ee51c65c0.zip |
Merge from HEAD: setsid trick to make XF4 work in fbdev
Merge from pix's HEAD: use c::_exit()
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 04ff46cbd..49b794b93 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()) { - exec $server, @options or exit 1; + if (!fork()) { + c::setsid(); + exec $server, @options or c::_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; } } |