geoff@eagle_snax.UUCP ( R.H. coast near the top) (10/07/88)
The DOS 4.00 "inhibit fatal error" feature seems horribly inadequate. I tried an open of "A:FOO" with the following setup: autocommit - NO does-not-exist - CREATE exists - REPLACE And for grins I put a physically write-protected diskette in drive A. With inhibit-critical-errors - NO I got a conventional "write protect error", and when I selected "fail", the call failed with AX=5 (access denied). However with inhibit-critical-errors - YES the call succeeded with AX=5 and CX=2 (file created)! Simlarly when I tried autocommit - NO does-not-exist - CREATE exists - REPLACE inhibit-critical-errors - YES on a file which DID exist on the floppy, it succeeded with CX=3 (file replaced). When I tried to write to the handle which came back, the write succeeded, but a second or two later (in fact as I was closing the handle) I got a write protect error. Clearly this was an artefact of the buffer cache mechanism. I tried again with autocommit - YES does-not-exist - CREATE exists - REPLACE inhibit-critical-errors - YES This time the write failed (AX=5), but I still got the write protect error - presumably the implied close at exit time is not protected from the critical error inhibition. I tried putting in an explicit CLOSE; this failed with AX=6 (invalid handle), and I STILL hit the Write protect error. In summary, if this feature was intended to allow people to dispense with the old int24 tricks, it is woefully inadequate. It appears that when I open the file I cannot tell whether the file is writeable: the call just succeeds willy-nilly. If I then try to write the file, the call will fail with an access denied condition, but when I come to close this handle (implicitly or explicitly) I am bound to get a critical error - which is what I was trying to avoid. Does anyone know if this is fixed in 4.0.1 (or maybe 4.1?). -- Geoff Arnold, Sun Microsystems Inc.+------------------------------------------+ PC Distrib. Sys. (home of PC-NFS) |If you do nothing, you will automatically | UUCP:{hplabs,decwrl...}!sun!garnold|receive our Disclaimer of the Month choice| ARPA:garnold@sun.com +------------------------------------------+