Is this a bug in execvp of std.process
Steven Schveighoffer
schveiguy at yahoo.com
Thu Sep 22 07:45:00 PDT 2011
On Wed, 21 Sep 2011 00:30:11 -0400, Cheng Wei <rivercheng at gmail.com> wrote:
> #import std.process
> void main() {
> execvp("ip", "route");
> }
>
> result:
> Object "ute" is unknown, try "ip help".
>
> That is the first two bytes are lost
>
> Adding two spaces works:
> #import std.process
> void main() {
> execvp("ip", " route");
> }
>
> Version 2.055, linux, 32bit
>
> Thanks.
Definitely a bug, but likely one that will not be fixed. std.process has
been rewritten, and the result is waiting for a change to the Windows C
runtime (dmc) for supporting pipes.
However, you are on Linux, so you can probably use the updated std.process
see here:
https://github.com/kyllingstad/phobos/tree/new-std-process
You will likely have to do some git cloning to get these into the latest
phobos.
-Steve
More information about the Digitalmars-d-learn
mailing list