www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Is this a bug in execvp of std.process

reply Cheng Wei <rivercheng gmail.com> writes:
== Repost the article of Cheng Wei (rivercheng gmail.com)
== Posted at 2011/09/21 00:30 to digitalmars.D.learn

#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.
Sep 21 2011
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
T24gVGh1cnNkYXksIFNlcHRlbWJlciAyMiwgMjAxMSAwMjo0MDozMiBDaGVuZyBXZWkgd3JvdGU6
Cj4gPT0gUmVwb3N0IHRoZSBhcnRpY2xlIG9mIENoZW5nIFdlaSAocml2ZXJjaGVuZ0BnbWFpbC5j
b20pCj4gPT0gUG9zdGVkIGF0IDIwMTEvMDkvMjEgMDA6MzAgdG8gZGlnaXRhbG1hcnMuRC5sZWFy
bgo+IAo+ICNpbXBvcnTvv71zdGQucHJvY2Vzcwo+IHZvaWTvv71tYWluKCnvv717Cj4g77+977+9
77+977+9ZXhlY3ZwKCJpcCIs77+9InJvdXRlIik7Cj4gfQo+IAo+IHJlc3VsdDoKPiBPYmplY3Tv
v70idXRlIu+/vWlz77+9dW5rbm93bizvv710cnnvv70iaXDvv71oZWxwIi4KPiAKPiBUaGF077+9
aXPvv710aGXvv71maXJzdO+/vXR3b++/vWJ5dGVz77+9YXJl77+9bG9zdAo+IAo+IEFkZGluZ++/
vXR3b++/vXNwYWNlc++/vXdvcmtzOgo+ICNpbXBvcnTvv71zdGQucHJvY2Vzcwo+IHZvaWTvv71t
YWluKCnvv717Cj4g77+977+977+977+9ZXhlY3ZwKCJpcCIs77+9Iu+/ve+/vXJvdXRlIik7Cj4g
fQo+IAo+IFZlcnNpb27vv70yLjA1NSzvv71saW51eCzvv70zMmJpdAo+IAo+IFRoYW5rcy4KClBs
ZWFzZSBkbyBub3QgcG9zdC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