Hangs on toStringZ()
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 27 10:01:36 PST 2016
On Tuesday, 27 December 2016 at 18:00:11 UTC, unDEFER wrote:
> On Tuesday, 27 December 2016 at 17:50:14 UTC, Stefan Koch wrote:
>> The string is allocated on the gc-ed heap.
>> And since it's an R value it might get destroyed before execl
>> is finished.
>> Assign the result of toStringz to a char* variable and use
>> that in the call.
>
> But execl not goes to Seg.fault. It hangs before call execl..
Have you tried assigning it to a variable ?
More information about the Digitalmars-d
mailing list