|
from : [EMAIL PROTECTED]
Ref :Renaming
file within Dos Application runing in dosemu erases target file if one alredy
exist.
I am
runing DOSEMU in Linx and within DOSEMU I am runing my DOS application. When my
application processes information, the information is stored in a database
and also in a file named A. Once the processing end my application renames the A
file to B. The information in file B is used by another one of my application
running on the network. But before that application uses file B it renames it to
a file C and then opens, read and delete files C. But in case if B file is
not removed/renamed B file to C in time and first application received new
information to process. Now you have new A file and still file B is there when
this application try to rename A file to B, file B get over writen by
application because it is runing in DOSEMU. This is a problem as I see
it.
I think there is no rename command in Linux only move command.
In DOSEMU this move command is used to emulate DOS rename command. And
problem is there because of this move command used in DOSEMU code. Check traget
file first refore using move command, and return error code if target file
already exist.
Normaly in DOS if file B exist and when you rename A file to
B, application will returns with error number and you have recovery provision in
application. I do not get any error number returned when B alredy exist during
renaming A file to B.
DO YOU KNOW THIS PROBLEM EXIST? / IS THERE ANY
FIX FOR IT?
Other thing i noticed that files are not geting
updated on disk drive fast enough. If i am runing 2 application in two DOSEMU in
same computer and if above senario I will not see B file on second application
for few seconds later. I am not sure about timing.
Please help me...
|
