[phobos] popen/pclose and bug 3157
Steve Schveighoffer
schveiguy at yahoo.com
Wed Sep 8 06:12:03 PDT 2010
I just reopened that issue. Walter reverted the patch because it caused an
infinite recursion in the compiler.
There's an updated patch, that needs to be added in order to be able to do the
windows development.
BTW, I have a windows version that compiles, I just can't test it, because the
workaround for that bug creates a module static constructor cycle.
-Steve
----- Original Message ----
> From: Lars Tandle Kyllingstad <lars at kyllingen.net>
> To: Discuss the phobos library for D <phobos at puremagic.com>
> Sent: Wed, September 8, 2010 5:48:50 AM
> Subject: Re: [phobos] popen/pclose and bug 3157
>
> On Wed, 2010-09-08 at 02:14 -0700, Brad Roberts wrote:
> > I just updated the patch that Lars created to address a major problem with
>popen
> > support in std.stdio. His version handles the first problem, the
>requirement
> > that a popened fd be closed via pclose rather than fclose.
> >
> > His patch doesn't address my second issue with popen/pclose, which is
>getting
> > the exit code from pclose back to the caller. I don't like what I just
>did. In
> > fact, I hesitated quite a bit before sending out this email. It's, well,
>fugly,
> > but works until a better solution can be found.
> >
> > I know that a major rework of std.process is a work in progress. What's
the
> > state of it? I have a need, right now, for being able to execute a command
>and
> > getting back both it's output and its exit code.. and it needs to work on
>all
> > platforms.
>
> The current status is that the POSIX version works, and has done so for
> a while. Its incorporation in Phobos, and development of the Windows
> implementation, has been blocked by a DMD bug which is now fixed in SVN.
>
> So I guess the next steps will be
> 1. Wait for next DMD release, which will contain aforementioned fix.
> 2. Finish up Windows version.
> 3. Code review and hopefully acceptance in time for following release.
> [ 4. Deprecation and subsequent death of File.popen(). ;) ]
>
> -Lars
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
More information about the phobos
mailing list