hi.
actually i hv to read lines from a file which is getting updated at the same time( new lines are appended at the end of the file).
plz suggest a way to implement it in c.
thx.
CoolAtt
0
Light Poster
Recommended Answers
Jump to PostUnder windows, getting the file open by two programs is a matter of using file sharing modes. The 'reader' would commonly "deny none" the 'updater' would commonly 'deny write'.
The only real concern I have is whether or not the two programs need to interact at all. How does …
Jump to PostSounds fairly straightforward then.
Make sure you plan that the reader might be able to get a 'partial' record from the updater. It is possible that the processor might swap from one app to the other before the record is completely written.
For file sharing, look at "FileShare …
Jump to PostIf you're planning to implement this in C, you're posting in the wrong forum. (I personally use the forum you posted your message into as a guide into how to answer the question.)
I'd have to go back and see what fgets() would do if it reached the 'end …
All 11 Replies
Murtan
317
Practically a Master Poster
CoolAtt
0
Light Poster
Murtan
317
Practically a Master Poster
CoolAtt
0
Light Poster
Murtan
317
Practically a Master Poster
CoolAtt
0
Light Poster
Salem
5,138
Posting Sage
CoolAtt
0
Light Poster
Murtan
317
Practically a Master Poster
CoolAtt
0
Light Poster
Murtan
317
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.