in reply to Re^3: Generating a readline error
in thread Generating a readline error

Well, I wouldn't like my web browser to crash if it encounters a read error on reading from a socket.

While there are many cases I would let a program die if it encounters a read error, there are enough cases where the program should be robust enough to deal with read errors.

Replies are listed 'Best First'.
Re^5: Generating a readline error
by Marshall (Canon) on Jul 17, 2009 at 23:29 UTC
    This sort of thing over not so reliable communication links is different than what I understood the question to be. I was watching one of my LWP programs yesterday and it bombed 4x in a row because the other site wasn't up. Things got sorted out and it worked. The application level stuff reconnects and tries again.

    Here the question appeared to be me to formulated in terms of a disk file access. Maybe I got the wrong impression. I've worked on a number of very impressive IBM disk systems and I've never seen an application "retry" work because we give it the "full court press" when we know the data is important.

    Anyway there is a big difference between: communication failed, bad packet, unable to connect, unable to authenticate, and "I've read some data but I know that is wrong, but before I use error correcting codes, I'm going to the best most consistent data that I can".

    Anyway a sophisticated disk system has already done a complex series of 200 attempts before it says "I can't read the data". The IP communication layer is not that robust.

      I don't really understand your post. Surely, you are not saying "cause the nifty IBM systems I worked with never give a read error, I cannot image anyone else getting one". I assume you realize not everyone has a nifty IBM system attached to his/her computer?
        This is a misunderstanding. The disk system (hardware, micro-code on disk hardware, I/F board (hardware and also micro-code) in conjunction with O/S driver and O/S does a lot. I have a prototype IBM drive that after 11 years is failing. I lost a Seagate and a WD drive last year during a massive power failure.

        ALL of these sub-systems thing fail. I am not saying different. The question appeared to be "how to do I simulate a failure"? I tried to help with that question. All hard drives will fail. It is not "if". It is just "when". I tried to help simulate "when".