Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!uwmacc!uwvax!umn-d-ub!umn-cs!ems!nis!stag!daemon From: daemon@stag.UUCP Newsgroups: comp.sys.atari.st Subject: Fcreate() bug? Message-ID: <260@stag.UUCP> Date: Wed, 18-Nov-87 01:52:22 EST Article-I.D.: stag.260 Posted: Wed Nov 18 01:52:22 1987 Date-Received: Sat, 21-Nov-87 03:55:22 EST Sender: daemon@stag.UUCP Lines: 26 > I recently read on this net (by Dale Schumacher) that Gemdos Fcreate > does not work properly. Can someone (maybe Dale) elaborate on that? > I use this function in an editor program, which means quite often for > existing files, and I never ran into problems: Existing files are > properly deleted before a new file with the same name is created. > How can this bug be observed? If I can reproduce it, I have to do the > trick with Fdelete first. But at present I see no need for that. > > Roland Waldi The Fcreate() problem is a difficult one to pin down. I'm still not sure what the exact cause is. In the version of MicroEMACS that I modified, the Fcreate() function was used to create the output file (presumably overwriting any existing file). Occasionally it would create two files with the same name in a single directory. Several other ST owners that I know have reported similar problems, by not frequently. The problem seems to occur more with smaller files (< 1K), like shell scripts. To avoid this problem, I implemented a creat() call in dLibs which always deletes the file before creating it, as shown by the source code I posted. Since Fdelete() is relatively quick and Fcreat() is quite slow, the extra time spent deleting the file is hardly noticed. If anyone knows anything more about this problem, I'd like to hear about it. Dale Schumacher ..ihnp4!meccts!stag!syntel!dal (alias: Dalnefre')