[Haskell-cafe] RE: ANN: System.FilePath 0.9

Andrew Pimlott andrew at pimlott.net
Thu Jul 27 14:07:11 EDT 2006


On Wed, Jul 26, 2006 at 04:02:31PM -0700, Andrew Pimlott wrote:
> I admit I don't know enough to say how the lpt1 issue should be
> handled.  Is there any Win32 call I can make that will help me avoid
> accidentally opening these magic files?  Say, if I call open with
> O_CREAT | O_EXCL?  Unfortunately, I can find very little information on
> how one should handle this issue.

Thanks to a suggestion from Bulat to use c_open, I was able to test
O_WRONLY | O_CREAT | O_EXCL on Windows.  In fact, Windows does allow
files like "nul" to be opened (as many times as you like) with these
flags, which I find dismaying.  So I still don't know the proper way to
handle them.

Andrew


More information about the Haskell-Cafe mailing list