[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] IO/Multiplex.pm warning



Hi Rob --

IO::Multiplex is awesome. I just thought you should know. -grin-

I'm trying to get a rather complex project off the ground.

One of the programs seems to be working fine, but is throwing this warning:

./com.pl IO::Multiplex read error: Bad file descriptor at /usr/lib/perl5/site_perl/5.8.3/IO/Multiplex.pm line 641, <DATA> line 1.

Th program in question does all kinds of silly things w/ IO::Multiplex. It 
- $mux->listen()'s on a local TCP port (IO::Socket::INET), allowing up to 100 connections
- connects to a remote TCP port (IO::Socket::INET) and sends data there periodically
- Launches (fork, exec) 6-20 children processes, and for each of those it
  - $mux->add($fh) a FIFO file that it needs to listen to 
  - writes to a different FIFO $fh 

(So, IO::Multiplex is making my life much easier.)

Anyhoo, here's the source throwing the warning (I added $0):

circa line 641:

                        unless (defined $rv) {
                            next if
                                $! == EINTR ||
                                $! == EAGAIN ||
                                $! == EWOULDBLOCK;
                            # JAY added $0
                            warn "$0 IO::Multiplex read error: $!"
                                if $! != ECONNRESET;
                        }
                        # There's an error, or we received EOF.  If
                        # there's pending data to be written, we leave
                        # the connection open so it can be sent.  If
                        # the other end is closed for writing, the
                        # send will error and we close down there.
                        # Either way, we remove it from _readers as
                        # we're no longer interested in reading from
                        # it.

The program seems to be working fine, do you think I should be concerned about that warning?

Is it an indicator that I'm doing something sloppy somewhere and not cleaning up after myself properly? If so, is IO::Multiplex cleaning up after me anyway? Should I be very concerned? Not very?

My other programs in the architecture use IO::Multiplex quite a bit too, and none of them throw that warning... -ponder-

Thanks for your time,

Jay Hannah
Director of Development
Omni Hotels Reservation Center
Tel: (402) 952-6573
Mobile: (402) 578-3976
Email: jhannah@omnihotels.com

Find out why we believe the Lone Star State is even more ideal this summer and about the Ideal Escape leisure package.  Call 1-800-The-Omni or visit us at www.omnitexashotels.com.