G
Guest
Hi,
I am re-writing part of my application using C#. This application starts
another process which execute a "legacy" program. This legacy program writes
to a log file and before it ends, it writes a specific string to the log file.
My original program (MKS Toolkit shell program) which keeps running "grep"
checking the "exit string" on the "log files". There are no file sharing
problem.
However, when I use File.Open or StreamReader to open the log files,
IOException is raised. I can see why, since the log files are open for
writes.
I am certain that Toolkit program such as "grep" or C function such as
"fopen()" will not encounter this problem.
Please note that there is no way for me to make any code changes to the
legacy program which is writing to the log file continuously.
Is there a way for me to by pass this restriction in C#?
Thanks,
I am re-writing part of my application using C#. This application starts
another process which execute a "legacy" program. This legacy program writes
to a log file and before it ends, it writes a specific string to the log file.
My original program (MKS Toolkit shell program) which keeps running "grep"
checking the "exit string" on the "log files". There are no file sharing
problem.
However, when I use File.Open or StreamReader to open the log files,
IOException is raised. I can see why, since the log files are open for
writes.
I am certain that Toolkit program such as "grep" or C function such as
"fopen()" will not encounter this problem.
Please note that there is no way for me to make any code changes to the
legacy program which is writing to the log file continuously.
Is there a way for me to by pass this restriction in C#?
Thanks,