[phobos] popen/pclose and bug 3157

Brad Roberts braddr at puremagic.com
Wed Sep 8 02:14:15 PDT 2010


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.

   http://d.puremagic.com/issues/show_bug.cgi?id=3157

Thoughts?

Thanks,
Brad



More information about the phobos mailing list