[Issue 3120] std.process.execv() pass arguments to programm incorrectly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 28 13:36:37 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3120
Masahiro Nakagawa <repeatedly at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |repeatedly at gmail.com
--- Comment #4 from Masahiro Nakagawa <repeatedly at gmail.com> 2010-05-28 13:36:35 PDT ---
This behavior is caused by dmc(I tested on Windows XP).
called.c
-----
#include <stdio.h>
int main(int argc, char* argv[])
{
int i = 0;
for (; i < argc; i++)
printf("%s ", argv[i]);
}
-----
caller.c
-----
#include <stdlib.h>
int main()
{
const char* const argv[] = {"a1", "a2", "a3", NULL};
execv("called.exe", argv);
return 0;
}
-----
dmc prints "called.exe a2 a3" but gcc prints "a1 a2 a3". I think expected
behavior is gcc result(not "called.exe arg1 arg2 arg3").
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list