Post by Anjina MurthyShare mode means, when a file is opened by one process for writing or
reading the same file must be able to open by one more process for
reading.
We specify FILE_SHARE_READ and FILE_SHARE_WRITE flag in win32
CreateFile function ,is there anything similar to that.
Anjan
Post by David SchwartzPost by Anjina MurthyHow to open a file in share mode in linux ( in 'C' ).
Umm, what is "share mode"?
DS
Well, under unix and linux many things are handled automatically
by the kernel and the security system. For example a process
may or may not have permission to read/write to a file depending
on the file's permissions setup when the file was created.
If a process opens a file and starts writing to it, other
processes may read from it (assuming the file's security
settings allow it). The 'tail' command demonstrates this;
you can start a process that writes to a file (say 'junk.txt')
then run 'tail -f junk.txt' and 'tail' will continuosly show
the last few lines in the file as it is extended by the original
program.
There are many sophisticted file monitoring and access features
available under unix and linux. So, if you provide a little
more detail about what you need to do, we can probably
provide more detailed answers.
Regards,
Larry
--
Anti-spam address, change each 'X' to '.' to reply directly.