On Thu, Jan 7, 2010 at 5:18 PM, Bulat Ziganshin
<[email protected]> wrote:
> Hello Bas,
>
> Thursday, January 7, 2010, 6:25:34 PM, you wrote:
>
>> So now I'm confused... are these standard file handles always open on
>> program startup or are there abnormal situations when they are closed?
>
> afaik, parent process may close them before executing your program,
> it's used in particular for running daemons

Thanks Bulat for explaining.

Then I think the standard handles should have a type that at least
encodes that they may be closed as in:

stdin ∷ MonadCatchIO pr
      ⇒ RegionT s pr (Maybe (RegionalFileHandle R (RegionT s pr)))

where Nothing means that the standard handle is closed.

However this still leaves open problem 1, 2 and 3.

Thanks,

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

Reply via email to