mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 00:53:23 -05:00
Adds more error checking, checks if xterm is actually exists.
This commit is contained in:
parent
d1586cdfa7
commit
beef95464b
11
gBootRoot
11
gBootRoot
@ -1073,6 +1073,15 @@ sub uml_box {
|
|||||||
my $pid;
|
my $pid;
|
||||||
if ($entry_advanced[8] &&
|
if ($entry_advanced[8] &&
|
||||||
$entry_advanced[10]) {
|
$entry_advanced[10]) {
|
||||||
|
# Check to see if it is an executable
|
||||||
|
my $executable = (split(/\s+/,$entry_advanced[8]))[0];
|
||||||
|
if (!find_file_in_path($executable)) {
|
||||||
|
error_window("gBootRoot Error: " .
|
||||||
|
"Enter a valid xterm, and " .
|
||||||
|
"executable option.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
unless ($pid = fork) {
|
unless ($pid = fork) {
|
||||||
unless (fork) {
|
unless (fork) {
|
||||||
if ($pid == 0) {
|
if ($pid == 0) {
|
||||||
@ -1135,6 +1144,8 @@ sub uml_box {
|
|||||||
sub remove_matching_process {
|
sub remove_matching_process {
|
||||||
|
|
||||||
my ($match_word) = @_;
|
my ($match_word) = @_;
|
||||||
|
|
||||||
|
# Just an overkill
|
||||||
if ($match_word =~ m,/,) {
|
if ($match_word =~ m,/,) {
|
||||||
$match_word =~ s,/,\\/,g;
|
$match_word =~ s,/,\\/,g;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user