Thread: File I/O - Same file, multiple processes

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    1

    File I/O - Same file, multiple processes

    Hi,

    I am writing a C program that reads from a log file that another running application is writing to.
    Are there any sort of contention issues I need to worry about? Do I have to worry about stalling my program if the other application has not written the next event yet?

    The other application simply writes 1 line at a time, and prints "#eof\n" when it is completely finished and it shuts down.
    I want to read one line at a time in my application and end when the other application shuts down.

    Thanks for the advice!

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It's really up to your OS if you can access the same file by multiple programs at the same time.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  5. File I/O problems!!! Help!!!
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 05-17-2002, 08:09 PM