Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Bad file Descriptor issue in IO::Socket::INET

by roboticus (Canon)
on Nov 19, 2012 at 11:05 UTC ( #1004514=note: print w/ replies, xml ) Need Help??


in reply to Bad file Descriptor issue in IO::Socket::INET

prashantktyagl:

You don't show any code, so it's hard to tell.

  • Are you properly checking your return values when performing operations that can fail?
  • Are you using global variables to hold your socket handles, possibly overwriting them with other things in other parts of your code?
  • Perhaps you're trying to continue to use a socket handle that closed?

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re: Bad file Descriptor issue in IO::Socket::INET
Re^2: Bad file Descriptor issue in IO::Socket::INET
by prashantktyagi (Scribe) on Nov 19, 2012 at 11:31 UTC
    Hi..roboticus
    Thanks for quick reply.

    I can show the code but it is too long. This script generates service build using perlsvc. It is written in perl. The code I mentioned checks the port checking if this port is active.

      "I can show the code but it is too long."

      Create a short script which purely reproduces the problem you are experiencing. How do I post a question effectively?. Earlier:

      "It was working fine before then I did some changes to it and rebuild this"

      What have you done to determine if the code change introduced this problem? Basic debugging checklist

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004514]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-10-21 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (98 votes), past polls