This works but only when i hit control + c in the terminal. Which gives control back to the parent window/process.
sub sixad {
for my $t ( @file1 ) {
if( $t =~ m/No controller found on USB busses./ ) {
&warning;
return
}
}
if ( $Count gt 0 ) {
open my $OutFile2, "+>", "tmp2", or die "Can't open file: $!";
my @sixad = qq/'\/usr\/bin\/sixad --start 2>tmp2'/;
print system qq( '@sixad' );
my @file2 = <$OutFile2>;
while( <@file2> ) {
$Pane->insert("end", $_);
}
return;
close($OutFile2);
}
else {
&warning;
return;
}
};