Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by roboticus (Chancellor)
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

Replies are listed 'Best First'.
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?
[Eily]: oh, boolean context uses the "" overload if no bool overload has been defined
[Eily]: (I wondered if overloading bool was actually necessary)
[Corion]: Yeah, you need bool to get a true value, and the rest to return the other value ;)
[choroba]: perl -wE '{package o; use Tie::Scalar; use parent -norequire => "Tie::StdScalar" ;sub FETCH { "x" x int rand 2}} tie my $x, "o" ; say $x for 1 .. 10'
[choroba]: for complete ness

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-07-27 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (414 votes). Check out past polls.