On Thu Aug 28 15:09:34 2014, bulk88 wrote: > On Mon Aug 18 23:05:20 2014, tonyc wrote: > > > > Patch attached for picking apart. > > > > Tony > > win32_popen returns a PerlIO*, which is wrong since win32_* are C lib > level replacements, not general perl api. If something. It should be > called Perl_do_popen, and remove win32_popen. win32_popen() emulates the Unix popen(), and since we're in perl land, it returns a PerlIO * instead of a FILE * (it used to return FILE *). > + Move(args_pvs, args_pvs+w32_perlshell_items, > narg+1, const char *); > + for (i = 0; i < w32_perlshell_items; ++i) > + args_pvs[i] = w32_perlshell_vec[i]; > > Why is 1 a Move and the other is a for loop? How about alloca instead > of the Newx? Good point on the for loop, I've changed it to a Copy(). Your mention of alloca() did get me thinking - the SvPV_nolen(args[i]) calls can croak, which would leak memory. I've removed the Safefree(args_pvs) calls and added SAVEFREEPV(args_pvs) instead. Tony --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=121159