Article View: comp.sys.ibm.pc
Article #15628Re: Major bug in all(?) versions of MS-DOS.
From: johnl
Date: Sun, 08 Feb 1987 16:31
Date: Sun, 08 Feb 1987 16:31
27 lines
2046 bytes
2046 bytes
In article <4274@utah-cs.UUCP> b-davis@utah-cs.UUCP (Brad Davis) writes:
>; Here is a probable bug (or feature) in MS-DOS. ...
>; The test goes like this:
>; Create a file with name 'xxx'. Call this file FD1.
>; Write 80 bytes to FD1.
>; Open the file named 'xxx' a second time. Call this file FD2.
>; Note that NO errors have happened yet.
>; Try to read 80 bytes from FD2. No bytes are read.
>; Note that NO error is reported.
It's a feture. That is, it's supposed to work that way. As far as I can
tell, when you create a file, DOS writes a directory entry that is zero
length. When you close the file, DOS rewrites the directory entry. If
you try to read the file in the meantime, you lose. This points out the
fact that in its heart of hearts DOS is more like CP/M than like Unix, even
though on the surface it gets more Unix-like in each revision.
Perhaps now that MS-net provides an environment in which multiple users are
reading and writing files all the time, MS will make the semantics a little
more reasonable, but I wouldn't count on it. Unix is fairly unusual in the
way that it lets any old program read a file while it is being written. It's
more common not to let anybody read the file until it is written and closed.
(By the way, this seems to me more like a nit than a major bug.)
--
John R. Levine, Javelin Software Corp., Cambridge MA +1 617 494 1400
{ ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.something
Where is Richard Nixon now that we need him?
Technical Details
Message-ID:
<479@ima.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!ima!johnlReferences:
<4274@utah-cs.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!ima!johnl From: johnl@ima.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Major bug in all(?) versions of MS-DOS. Message-ID: <479@ima.UUCP> Date: Sun, 8-Feb-87 11:31:00 EST Article-I.D.: ima.479 Posted: Sun Feb 8 11:31:00 1987 Date-Received: Mon, 9-Feb-87 04:02:31 EST References: <4274@utah-cs.UUCP> Reply-To: johnl@ima.UUCP (John R. Levine) Organization: Javelin Software Corporation Lines: 27 Keywords: bug