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]

Re: Socket creation fails, passes under activestate


Dan Dixon schrieb am 2001-09-27, 21:42:

>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.

Hmmm, dunno what to say.  Have you been at the same machine before?
Same System? This is not a perl problem, not at cygwin problem.
Why are you using cygwin 1.1.8? Isn't it possible for you tto update 
to 1.3.xxx?

Check of your script::
$ ./socket.pl
+OK NetAddress-POP v2.7; cpdvg201.cms.usa.net

Your script works +OK here.
$ uname -a
CYGWIN_NT-4.0 LORELEY 1.3.4(0.46/3/2) 2001-09-25 03:06 i686 unknown

One difference: This is the machine where cygwin-perl was built on.

>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...

Try a search in the cygwin archives, I remember some related mails,
since I have never problems with sockets I didn't follow the threads.

http://www.cygwin.com/

Gerrit


-- 
=^..^=

--
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]