Browse Source

Adds more error checking, checks if xterm is actually exists.

master
freesource 24 years ago
parent
commit
beef95464b
  1. 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…
Cancel
Save