Assessing files through file descriptors

Zuurbier, E. - AMSXE Erik.Zuurbier@KLM.NL
Thu, 22 Apr 1999 13:29:20 +0200


> What I would need is a function
> 
> 	fdopen :: Int -> (Bool,!*File)
> 
I guess that this would conflict with the whole idea of uniqueness and the
single threaded use of the file that uniqueness is trying to guarantee.

If the file is already open, as you say, then there may be one reference to
it, somewhere.
If you then use fdopen somewhere else to create a fresh reference to the
same file,
you have two references! Uniqueness would ans should not allow that.

Erik Zuurbier