Re: Floppy handling

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Fri Jun 23 2000 - 17:13:14 EST


In <20000623231719.A30832@pcep-jamie.cern.ch> Jamie Lokier (lk@tantalophile.demon.co.uk) wrote:
JL> Khimenko Victor wrote:
>> > It might be reasonable to implement: (a) if any files are open, lock the
>> > disk; (b) for floppies locked disk == keep the light on;
>>
>> Just grrrreat for notebooks and programs like WinWord (WinWord will create
>> lock file near document and will keep it open while document is open in
>> editor). Real smart.
>>
>> > (c) process current directories don't count towards (a) (but open handles do).
>>
>> > That gives the hypothetical database user the clue not to remove the
>> > disk. For everyone else, the light is on only when necessary.
>>
>> Do you think light must be on all the time while you are writing letter ?
>> I think not.

JL> Of course not. If there are editors that work that way, than
JL> locked==motor is indeed flawed.

There are such editors, all right.

JL> But I've never used a unix editor that keeps a file open, not even to
JL> lock the file. (Emacs can lock files without keeping anything open.
JL> Other editors like Gimp, vi, xfig, even Netscape composer etc. don't keep
JL> files open).

JL> Why would WinWord do that, and can Wine convince it not to?

For few reasons. It's done for
  1) Locking (this way other WinWord can know that file is edited just now;
even on network: it'll try to remove that "lock" file (see below) and if this
operation is successfull it assumes that file was just lost in crash).
  2) Prompting: before writing file back on floppy WinWord will write to that
"lock" file first and thus Windows will prompt user to put "right" floppy back
if it was changed (so now Microsoft thinks that it's better to NOT silently
write file on different floppy if user changed it - I think there were reasons
to do this; especially if it needed to create a lot of code to support such
mode). It even worked with WinWord95 and Windows95. When I checked few minutes
ago with Windows98 and WinWord2000 it just complained that I put wrong disk in
drive and refused to save anything (even when I switched disks back). On
non-removeable disks WinWord doing the same but will also create file with
mangled filename (file.doc => ~$file.doc) to keep information about user
who now editing file there (so other copy of WinWord will not just complain
that file is opened by other user but can also say - who did it).
  May be there are other reasons as well - I'm not know.

What about Wine... Not sure. But I know at least one editor (MIM) which does
not even load full file on startup! It was written for Z80-based systems with
VERY slow floppies and it was done to speedup startup. Now it's just reminder
about "good old days" but it's still there: it creates two temporary files
in current directory ("top stack" and "bottom stack") but if file was never
scanned to end it using source file is well. All three files are opened for
whole editing session ("top stack" and "bottom stack" - R/W, file itself - R/O).

P.S. Oh, and MIM was not used via DOSEMU: it's ported to Linux now, but last
time I checked irt still created "top stack" and "bottom stack" in current
directory.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:26 EST