[Freedos-devel] File directory buffering and updates

2011-07-10 Thread Michael B. Brutman

I have a report from a user who is getting stale directory data when 
running the mTCP FTP server.  They are running a TSR in the background 
which is updating a file once a day.  If they connect to the FTP server 
and look at the directory they will see the date and size of the file at 
the time the FTP server started, not the most current values.

Apparently a WATTCP32 based app has the same symptoms, but the Datalight 
Sockets FTP server does not.  (I think the Datalight Sockets FTP server 
runs as a TSR, not a foreground app.)

I use _dos_findfirst and _dos_findnext to read directories. These use 
function 0x4E.  I expect that if there is a TSR modifying something in 
the background that calling the DOS function directly (as I am) should 
provide the most current results, but that is not what is being 
reported.  Can somebody give me an idea of what I am missing?  I am not 
sure what they would get if they tried to open the file and transfer 
it.  I also don't know if the TSR is closing the file after each update 
- I imagine that leaving the file open would create problems.


Regards,
Mike



--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] File directory buffering and updates

2011-08-06 Thread dos386
Interesting ... but lacks details. AFAIK DOS has no
good multitasking design so you can't do reliably file
I/O (even more writes) from a TSR.

- file not closed after update ?
- file updated using lower level sector access ?
- updating of the file fails while your FTP server is runnig (check
after exit) ?
- FreeDOS vs EDR-DOS ?

What does the TSR do ?

Of course you could add a feature into your FTP server
at given time to automatically suspend, spawn some
other app (updating the files), and then continue.

Alternatively, define a "communication block" in memory,
the TSR will write it's wishes into this block only, and your
FTP server will execute them on files (rename, append
data, replace data, kick file, ...).

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel