On 10/11/06, Stefan Aeschbacher <[EMAIL PROTECTED]> wrote:
Hi

I need to open a file and keep it open for writing (a log file). Another
process has
to read from this file. On windows the second process (e.g. tail -f) can not
open the file.
How can I open a file without this locking?

Using base-package's IO-system, that is not possible as far as I know.
The flag you need to pass CreateFile (api call which is used to open
practically all files) is FILE_SHARE_READ.

You can find these in Win32-package, but files opened via raw api
bindings don't work well together with base-packages IO-system (ie,
you need to read and write using rawish api calls.)

Best regards,
Esa
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to