[phobos] Removing std.stdio.File.popen()

Andrei Alexandrescu andrei at erdani.com
Tue Aug 17 21:46:40 PDT 2010


It doesn't matter how often it's used internally, but instead how often 
it's used by programs. I use it and find it very useful. We should move 
toward fixing it and porting it to other OSs. Replacing with the more 
comprehensive solution that's being discussed is of course another option.

Incidentally a colleague of mine mentioned today a much faster 
implementation of popen():

http://blog.famzah.net/2009/11/20/a-much-faster-popen-and-system-implementation-for-linux/

http://code.google.com/p/popen-noshell/

We should get that in Phobos.


Andrei

On 08/16/2010 03:11 AM, Lars Tandle Kyllingstad wrote:
> I just noticed that std.stdio.File.popen() is POSIX-only.  Taking that
> into account, along with the fact that it is buggy (issue 3157), does
> anyone mind if I remove it?
>
> It's only used once in Phobos, namely in std.process.shell(), which is
> easily implemented by using core.sys.posix.stdio.popen() together with
> core.sys.posix.stdio.fdopen() and std.stdio.File.wrapFile().
>
> -Lars
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list