September 21, 2011 Is this a bug in execvp of std.process | ||||
---|---|---|---|---|
| ||||
#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. |
September 22, 2011 Re: Is this a bug in execvp of std.process | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cheng Wei | On Wed, 21 Sep 2011 00:30:11 -0400, Cheng Wei <rivercheng@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 |
Copyright © 1999-2021 by the D Language Foundation