[Issue 1796] New: execv does not initialize argv properly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 21 10:46:03 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1796
Summary: execv does not initialize argv properly
Product: D
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: andrei at metalanguage.com
Consider:
import std.process, std.stdio;
void main(string[] args)
{
writeln(args);
assert(args.length);
execv(args[0], args[1 .. $]);
}
This program should execute itself forever. In fact, when started with no
options, it asserts at the second execution: args is not properly initialized
by the execv function.
--
More information about the Digitalmars-d-bugs
mailing list