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


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #1 from [email protected] 2012-02-24 19:41:34 PST ---
You're calling execvp with the wrong arguments. You need to call it like this:

execvp("ip", ["ip", "route"]);

because argv[0] is supposed to be the name of the program, and argv[1]... are
the program arguments.

As for the actual bug (first two characters get eaten), it's not a Phobos bug,
it's a bug in /bin/ip. To prove this, try this (from your home directory):

ln -s /bin/ip ./route
./route

You'll get the same error message, because argv in this case = ["ip"]. It
appears that /bin/ip is doing something strange when argv[0] is not equal to
"ip", but there's not much Phobos can do about it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to