summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/XFdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-18 17:35:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-18 17:35:17 +0000
commit3ce35b6a36bd75410c11af5e804a08f7d5650aa8 (patch)
tree5ae179989ea0f261fd5d91cb822fe6a452617f59 /perl-install/standalone/XFdrake
parentaa6398654727a7ebc408f50520fe6ae3266ae27b (diff)
downloaddrakx-backup-do-not-use-3ce35b6a36bd75410c11af5e804a08f7d5650aa8.tar
drakx-backup-do-not-use-3ce35b6a36bd75410c11af5e804a08f7d5650aa8.tar.gz
drakx-backup-do-not-use-3ce35b6a36bd75410c11af5e804a08f7d5650aa8.tar.bz2
drakx-backup-do-not-use-3ce35b6a36bd75410c11af5e804a08f7d5650aa8.tar.xz
drakx-backup-do-not-use-3ce35b6a36bd75410c11af5e804a08f7d5650aa8.zip
factorize code in ask_window_manager_to_logout_then_do()
Diffstat (limited to 'perl-install/standalone/XFdrake')
-rwxr-xr-xperl-install/standalone/XFdrake16
1 files changed, 1 insertions, 15 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index 2738057a6..47f138e47 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -95,19 +95,5 @@ sub ask_for_X_restart {
$in->ask_okcancel('', N("You need to log out and back in again for changes to take effect"), 1) or return;
- if (fork()) {
- any::ask_window_manager_to_logout($wm);
- return;
- }
-
- open STDIN, "</dev/zero";
- open STDOUT, ">/dev/null";
- open STDERR, ">&STDERR";
- c::setsid();
- exec 'perl', '-e', q(
- my ($wm, $pid) = @ARGV;
- my $nb;
- for ($nb = 30; $nb && -e "/proc/$pid"; $nb--) { sleep 1 }
- system("killall X") if $nb;
- ), $wm, $pid;
+ any::ask_window_manager_to_logout_then_do($wm, $pid, 'killall X');
}