Glib::IO::add_watch doesn't work in Windows



Hi,
The add_watch function seem not work in Windows. I test using
this script:

use Gtk2 '-init';
use Glib qw/FALSE TRUE/;
Glib::IO->add_watch(
    fileno(STDIN),
    'in',
    \&callback,
    \*STDIN,
);
Gtk2->main;

sub callback {
    my ($fd, $cond, $fh) = @_;
    my $line = <$fh>;
    print "You just input $line\n";
    return FALSE;
}

The script works in Ubuntu.
But in windows, seem the program is block in the mainloop, and
all inputs will appear in the command line after I press Ctrl-C.

--
Best regards.
Ye Wenbin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]