Mojo::Pg sample test problem

24 views
Skip to first unread message

davi...@gmail.com

unread,
Nov 9, 2017, 3:31:17 AM11/9/17
to Mojolicious
Hi,  I'm try Mojo::Pg sample code in https://github.com/kraih/mojo-pg  but I get an error on the non-blocking:
[Thu Nov  9 14:47:44 2017] [error] Can't dup: Bad file descriptor at C:/Perl/site/lib/Mojo/Pg/Database.pm line 161.

The running enviroment:
Windows 7
Perl : (v5.26, MSWin32)
Mojolicious and Mojo::Pg module are all newly installed.

error detail:
Can't dup: Bad file descriptor at C:/Perl/site/lib/Mojo/Pg/Database.pm line 161.
156 
157   return if $self->{watching} || $self->{watching}++;
158 
159   my $dbh = $self->dbh;
160   unless ($self->{handle}) {
161     open $self->{handle}, '<&', $dbh->{pg_socket} or die "Can't dup: $!";
162   }
163   Mojo::IOLoop->singleton->reactor->io(
164     $self->{handle} => sub {
165       my $reactor = shift;
166 

David

sri

unread,
Nov 9, 2017, 5:19:46 AM11/9/17
to Mojolicious
Hi,  I'm try Mojo::Pg sample code in https://github.com/kraih/mojo-pg  but I get an error on the non-blocking:
[Thu Nov  9 14:47:44 2017] [error] Can't dup: Bad file descriptor at C:/Perl/site/lib/Mojo/Pg/Database.pm line 161.

I've heard about this before. I think we can't support non-blocking queries on some flavours of Windows Perl.

--
sebastian

davi...@gmail.com

unread,
Nov 10, 2017, 5:51:34 AM11/10/17
to Mojolicious
thank you.

在 2017年11月9日星期四 UTC+8下午4:31:17,davi...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages