| Store | Cart

Re: Memory leak in backticks and system

From: Eric Brine <ikeg...@adaelis.com>
Thu, 17 Apr 2014 11:53:38 -0400
On Thu, Apr 17, 2014 at 6:12 AM, Shlomi Fish <shlo...@shlomifish.org> wrote:

> On Fri, 11 Apr 2014 13:46:53 -0400> Eric Brine <ikeg...@adaelis.com> wrote:>> > On Fri, Apr 11, 2014 at 4:02 AM, Shlomi Fish <shlo...@shlomifish.org>> wrote:> >> > >> > > I am able to reproduce this behaviour on Windows 7 x86-64 with> Strawberry> > > Perl> > > 5.18.2.1 . It also happens with the list version of system.> > >> > > while (1) {> > >         system("dir", "C:\\");> > > }> > >> >> > If by "list version of system" you mean the version that avoids the> shell,> > that's not it. You have to use system({ "dir" } "dir", "C:\\"). Of> course,> > that won't work because "dir" is a shell builtin.>> Ah, I see. OK.>

Just to be clear, multi-arg is guaranteed to avoid the shell on
non-Windows, but you have to use the system BLOCK LIST form on Windows.

Recent Messages in this Thread
Jesper Jørgen Persson Apr 08, 2014 12:57 pm
Shlomi Fish Apr 11, 2014 08:02 am
Shlomi Fish Apr 11, 2014 08:35 am
bulk88 Apr 11, 2014 10:35 am
Eric Brine Apr 11, 2014 05:46 pm
Shlomi Fish Apr 17, 2014 10:12 am
Eric Brine Apr 17, 2014 03:53 pm
Thomas Sibley Apr 17, 2014 04:22 pm
Curtis Jewell Apr 17, 2014 05:34 pm
Curtis Jewell Apr 17, 2014 05:36 pm
Thomas Sibley Apr 18, 2014 03:29 am
Smylers Apr 17, 2014 05:37 pm
Aristotle Pagaltzis Apr 17, 2014 11:23 pm
Messages in this thread