diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-23 21:34:40 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-23 21:34:40 +0000 |
commit | c33954b0763e0ba0b27f1a970e23150d92a48fe1 (patch) | |
tree | 08ea1c673d3d7b2d1a6594d0100c83d105779711 /perl-install/keyboard.pm | |
parent | b9956e388403d697c7daf51563f5a5f1bf5b111d (diff) | |
download | drakx-c33954b0763e0ba0b27f1a970e23150d92a48fe1.tar drakx-c33954b0763e0ba0b27f1a970e23150d92a48fe1.tar.gz drakx-c33954b0763e0ba0b27f1a970e23150d92a48fe1.tar.bz2 drakx-c33954b0763e0ba0b27f1a970e23150d92a48fe1.tar.xz drakx-c33954b0763e0ba0b27f1a970e23150d92a48fe1.zip |
reuse bg_command:
- major cleanups
- get rid of "kid exited -1 at /usr/lib/libDrakX/network/tools.pm line 182."
warnings
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r-- | perl-install/keyboard.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 695c8747b..672384eb7 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -476,19 +476,15 @@ sub setup { } elsif (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$kmap.bkmap")) { load(scalar cat_($f)); } else { - my $F; - if (my $pid = open $F, "-|") { - local $/ = undef; - eval { load(join('', <$F>)) }; - waitpid $pid, 0; - } else { + my $kid = run_program::bg_command(sub { eval { require packdrake; my $packer = new packdrake("$ENV{SHARE_PATH}/keymaps.cz2", quiet => 1); $packer->extract_archive(undef, "$kmap.bkmap"); }; - c::_exit(0); - } + }); + local $/ = undef; + eval { my $fd = $kid->{fd}; load(join('', <$fd>)) }; } if (-x "/usr/X11R6/bin/setxkbmap") { setxkbmap($keyboard); |