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

Lots of these things like EAGAIN aren't really "errors", somebody doing that would be expected to handle this situation. aysnc read/write is common in realtime systems.

Some of these things like EFAULT, can't be done as a user (O/S) won't allow it.

One simple idea for you is to setup some I/O intensive thing on a flash drive. Then reach down and unplug that thing. This will look like disk drive died midstream and some kind of error will happen. Depending upon file system, timing of this, etc. the result might be even complete loss of all data on that stick. But if it formatted to look like a hard drive, then I think you can set up (maybe with a few ties) something like looks like EIO (bad sector) because the "checksum" for that sector will be wrong. If I'm right, then you have a known bad file on a "disk drive" that you can test with. Setup up loop with write intensive thing, unplug drive, then see if you can read all files after you reset program, replug in and try reading. May take a couple of tries to hit this right and get desire effect.

Replies are listed 'Best First'.
Re^3: Generating a readline error
by ikegami (Patriarch) on Jul 17, 2009 at 19:19 UTC

    Lots of these things like EAGAIN aren't really "errors",

    But Perl's not gonna treat them any different than EIO, it's a good substitute for EIO for testing.

      Great! let us know how it goes...was just trying to be helpful!