By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,445 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,445 IT Pros & Developers. It's quick & easy.

Read only access on an already open file

P: n/a
Hello everyone.

I want to know the best way to accomplish this particular situation.

I have a C++ application that has a file open for write access
constantly and it is always updating the information in the file (
maybe once a second or so ). That isnt the problem :)

I want to have a second seperate application (written in PHP or Java,
but thats irrelavent) that _only_ reads the information in the file.
So it will open it for read access only, read it in, and close it.

I know that things don't really work well when files already have open
handles on them, so i was wondering what the input was regarding this.
Im sure this has to be done somewhere as I dont think its revolutionary
:) Just escapes me as to what to do.

Thanks everyone!

Nov 4 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
elitecodex wrote:
I want to know the best way to accomplish this particular situation.

I have a C++ application that has a file open for write access
constantly and it is always updating the information in the file (
maybe once a second or so ). That isnt the problem :)
OK
I want to have a second seperate application (written in PHP or Java,
but thats irrelavent)
Relevant enough to make your question OT...
that _only_ reads the information in the file.
So it will open it for read access only, read it in, and close it.

I know that things don't really work well when files already have open
handles on them, so i was wondering what the input was regarding this.
Post to the newsgroup that deals with your OS. File access across
processes, locking, rights, exclusiveness, etc., are all features of your
OS, not of the language.
Im sure this has to be done somewhere as I dont think its revolutionary
:) Just escapes me as to what to do.


That's simple: find a better place to ask your OS-specific question.

V
Nov 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.