Posix.createPipe failing

Keean k.schupke@ic.ac.uk
Sun, 13 Apr 2003 12:22:55 +0100

What you can do is return the data from the lazy read strictly, and the
close the file handle. using the Strategies library you get something like:

	a <- hGetContents h
	b <- return $ processInput a
	rnf a `seq` hClose h

Sometimes even this does not appear to be strict enough (in my experiance
processInput includes operations like map, then you have to "rnf" the data
before the
map as well. Sometimes I end up passing the file handle with the stream, to
enable me
to close it as soon as possible.

	Keean Schupke.

-----Original Message-----
From: glasgow-haskell-users-admin@haskell.org
[mailto:glasgow-haskell-users-admin@haskell.org]On Behalf Of Hal Daume
Sent: 11 April 2003 20:11
To: GHC Users Mailing List
Subject: Posix.createPipe failing

After running a few hundred createPipe's, they begin to fail for me,
giving the error:

Fail: system error
Action: createPipe

This seems to me to be like the "not enough file handles" error you get
when using lazy readFile, since this doesn't close the handle soon
enough.  Am I correct in this intuition and if I am (or otherwise), how do
I fix it?


 - Hal

 Hal Daume III                                   | hdaume@isi.edu
 "Arrest this man, he talks in maths."           | www.isi.edu/~hdaume

Glasgow-haskell-users mailing list