[phobos] std.process Windows blocker
Lars Tandle Kyllingstad
lars at kyllingen.net
Wed May 5 01:02:19 PDT 2010
On Tue, 2010-05-04 at 13:28 -0700, Walter Bright wrote:
> Lars Tandle Kyllingstad wrote:
> > On Mon, 2010-05-03 at 18:54 -0700, Steve Schveighoffer wrote:
> >> I can create pipes by directly calling the Windows system call, the problem is, the C runtime lacks a way of wrapping a Windows HANDLE type into a FILE *. [...]
> >>
> >
> > You'd think that would be a common enough situation to warrant having a
> > function in the Windows API doing just that -- like POSIX' fdopen(). I
> > mean, isn't FILE* the de facto file handle standard in the C world?
>
> Pipes aren't standard C <g>.
I didn't mean the pipe creation functions. :)
On POSIX you have fdopen() to wrap a FILE* handle around an OS file
descriptor, and fileno() to extract an OS file descriptor from a FILE*
handle. These are part of the POSIX specification, and therefore
available regardless of which runtime is being used.
If I've understood Steve correctly, the same isn't true on Windows.
Rather, it seems Microsoft have tucked the corresponding functions away
in their own C runtime. :(
-Lars
More information about the phobos
mailing list