syswrite, closed socket and error handlingby InfiniteLoop (Hermit)
|on Aug 14, 2006 at 19:37 UTC||Need Help??|
InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:
This is a followup on my earlier query: syswrite and closed sockets. Although the excellent guide by fellow monks solved many of the problems, however I hit upon one more issue and request your insights.
I have the following piece of code, which uses IO::Socket::INET to open a blocking socket against a messaging server and attempts to write a text:
While this code is running, I shutdown the message service. This causes the script to exit, after a couple of iteration. I was expecting to see the croak message, however the script just exits.
I tried to execute this script via Komodo IDE, and in the IDE output window I could see the croak message. Besides if I modified the error handling part to, lets say, write a message to a file and follow the process: