Wierd Linux chat2.pl problem with sockname 
Author Message
 Wierd Linux chat2.pl problem with sockname

I just finally *solved* (YAY) a wierd chat2.pl problem.  
This probably only applies to Linux users (I'm 1.1.18) who use
perl 4pl036 or thereabouts.

The problem was that any attempts to "chat'open_port(...)" would
raise an error with bind:
        Cannot assign requested address

After a couple of hours of man page reading, twiddling, etc., I figured
out that the assignment to $thisproc, which is used by chat's bind
routine to give a socket a name, should change from
        $thisproc = pack($sockaddr, 2, 0, $thisaddr);
to
        $thisproc = pack($sockaddr, 2, $thisaddr);

Can anyone explain why this is so?  Is Linux's socket.h broken?
And why am I still getting
        chat'close: Bad file number
?

Any clues on the {*filter*} issue would be appreciated, mail or news.

Cheers!


--



Tue, 26 Nov 1996 01:32:59 GMT  
 Wierd Linux chat2.pl problem with sockname


Quote:
>And why am I still getting
>    chat'close: Bad file number

I also suffer from this.  The program I learned how to use chat from
ignored the possibility of error messages from chat'close, and now I do
the same.  I use Solaris something which calls itself SunOS 5.3 and also
SunOS 4.1.3

--
*----------*-------------------------------------------------------------*
| Sam   Jam|"Never underestimate the importance of a cheap laugh"-       |

*---For ScoobyDoo episodes mail with "hoi! list scooby" as subject line--*



Tue, 26 Nov 1996 06:24:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. chat2.pl, hget.pl and socket.ph problems

2. Help: problem with ftp.pl and chat2.pl

3. hget.pl, chat2.pl and socket.ph problems

4. Q: problems with chat2.pl

5. Chat2.pl, ftp.pl, etc

6. chat2.pl problems on Solaris

7. Problems using chat2.pl under Solaris 2.5, perl 5.003

8. chat2.pl problem

9. chat2.pl problem

10. chat2.pl problem

11. socket.ph, ftp.pl and chat2.pl error found for Solaris and Irix

12. help with ftp.pl/chat2.pl

 

 
Powered by phpBB® Forum Software