Gtk::Gdk::input_add and CPU racing
- From: David <heygus hotpop com>
- To: gtk-perl-list gnome org
- Subject: Gtk::Gdk::input_add and CPU racing
- Date: 24 Feb 2003 22:05:20 -0800
Hello,
I am new here and I was hoping for some help. Thanks in advance.
I am working input_add to try to monitor the status of an external
command.
I use this code(simplified here):
#########################################
open(LS, "ls 2>&1 |");
$text->Gtk::Gdk::input_add(fileno(LS),['read'],\&list);
sub list{
while(<LS>)
{ $text->insert( $font, undef, undef, $_ );}
}
##########################################
My problem is when the command is done my cpu starts to race. I am not
sure where or how to close the IO.
Any help here would sure be appreciated.
Thanks
Dave
--
David <heygus hotpop com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]