On 2008-08-28 14:45 -0700 (Thu), Jonathan Cast wrote:

> Now, I happen to know that the only top-level handles that can be
> established without issuing an open system call are
> 
> stdin
> stdout
> stderr
> 
> (unless you're happy to have your global nonStdErr start its life
> attached to an unopened FD).

I've not thought through exactly how this might relate to your argument,
but certainly, though there might or might not be Haskell Handles for
other file descriptors, they can start out open without calling open.
Compile this simple program:

    #import <stdio.h>

    int main() {
        int n;
        n = write(5, "foobar\n", 7);
        printf("write returned %d\n", n);
        return 0;
    }

and run it with "./a.out 5>&1" and have a look at the result you get.

cjs
-- 
Curt Sampson       <[EMAIL PROTECTED]>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to