This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Socket creation fails, passes under activestate


Running WinME, cygwin 1.1.8-2, perl 5.6.1-1

The following script works fine when run with
activestate perl on the same machine.  When
run under cygwin connect() returns:
"The descriptor is a file, not a socket"

#!/usr/bin/perl
use Socket;
my $proto = getprotobyname('tcp');
socket('F', PF_INET, SOCK_STREAM, $proto);
my $sin = sockaddr_in(110,inet_aton('pop.netaddress.com'));
connect('F',$sin) || die $!;    #<-- dies here, connect returns undef
                                          # $!: "The descriptor is a file,
not a socket"
$stuff = <F>;
print "$stuff\n";
close F;

This is a new problem and all this used to work before
I deleted and re-added my TCP-IP -> lan adapter.

ftp, http, manual telnet to port 80's all work fine from
cygwin command line.  It core dumps when I try to
use the activestate socket library with the cygwin
executable (probably not a surprise, but I thought
I'd try it anyway).  I have completely removed and
reinstalled the cygwin release (including all tools
and perl).  I have completely removed and reinstalled
by lan adapter.  No luck.

Perl-cygwin rocks and I have come to depend on it.
ANY help is appreciated.  Thanks...


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]