mirror of
https://github.com/fspc/gbootroot.git
synced 2025-04-04 07:43:22 -04:00
This solves the Xlib unexpected async reply problem by using Gtk->_exit($pid)
with the child process.
This commit is contained in:
parent
fdd9a07616
commit
5437548890
@ -1073,13 +1073,16 @@ sub uml_box {
|
||||
my $pid;
|
||||
unless ($pid = fork) {
|
||||
unless (fork) {
|
||||
if ($pid == 0) {
|
||||
sys("$entry_advanced[8] $entry_advanced[5] $entry_advanced[9] $entry_advanced[10]");
|
||||
Gtk->_exit($pid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
waitpid($pid,0);
|
||||
|
||||
# sys ("perl -e 'system \"$entry_advanced[8] $entry_advanced[5] $entry_advanced[9] $entry_advanced[10]\";'");
|
||||
} );
|
||||
|
||||
|
||||
@ -1093,6 +1096,7 @@ sub uml_box {
|
||||
remove_matching_process($entry_advanced[10]);
|
||||
# Debian
|
||||
remove_matching_process("Virtual Console");
|
||||
# Again for good measure :)
|
||||
remove_matching_process($entry_advanced[10]);
|
||||
}
|
||||
} );
|
||||
@ -1124,12 +1128,13 @@ sub remove_matching_process {
|
||||
my $process = (split(/\s+/,$_,))[1];
|
||||
system "kill $process";
|
||||
}
|
||||
# no so friendly approach
|
||||
# not so friendly approach
|
||||
if (m,$match_word,) {
|
||||
my $process = (split(/\s+/,$_,))[1];
|
||||
system "kill -9 $process";
|
||||
}
|
||||
}
|
||||
close(P);
|
||||
|
||||
} # end remove_matching_process
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user