stale files

Chris Hawkins chrish at harborside.com
Fri Dec 21 11:01:06 GMT 2001


Hello -

I have samba running on a linux (red hat) machine, with several shares defined in smb.conf for my Windows machines to use.  

I have an application on the linux box that I run from the Windows machines by way of a terminal emulation program called SmarTerm.  I've written a little program that runs on the host (linux); it opens a file on the host and reads 5 records.  I store the indexes of those records in a string, and send them into a SmarTerm macro that opens the file (so here's where samba comes in) re-reads the same five records, and builds a nice gui window in which the records can be changed.  When I exit the window, I send all the text back to the host program, and the host app then handles writing the records back to the file.

Problem is, when I run the macro again, it doesn't seem to be really reading the file, but relying on a cached version.  In other words, I get back the 5 original records, not reflecting the changes.  I can look at the file on the host (i.e., not relying on samba) and see that the changes were in fact made.  If I stop/start samba (/etc/rc.d/init.d smb restart) and run the macro again, I see the right records.

Can anyone provide a suggestion as to how to force samba to take a fresh look at the file every time I open/read it from Windows?

Thanks,

Chris Hawkins
Leland Associates
chrish at harborside.com


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/20/2001
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba mailing list