develooper Front page | perl.perl5.porters | Postings from April 2019

[perl #134046] perlport - Open modes -| and |- now supported inWin32

Thread Previous | Thread Next
From:
Dan Book via RT
Date:
April 24, 2019 01:39
Subject:
[perl #134046] perlport - Open modes -| and |- now supported inWin32
Message ID:
rt-4.0.24-15986-1556069962-732.134046-15-0@perl.org
On Tue, 23 Apr 2019 18:34:57 -0700, tonyc wrote:
> On Thu, 18 Apr 2019 15:47:06 -0700, grinnz@gmail.com wrote:
> > Pipe open modes in the list form of open() have been supported in
> > Win32
> > since Perl 5.22. Thus the "Win32" designation should be removed from
> > the
> > note in the section for open in perlport. It doesn't appear that any
> > of the
> > other function notes reference limitations in past versions of Perl.
> >
> > I am unsure if an additional note should be added for Win32, as the
> > Perl
> > 5.22 perldelta says "It has the same limitations as system LIST on
> > Win32,
> > since the Win32 API doesn't accept program arguments as a list." but
> > also
> > "Note: unlike system LIST this does not fall back to the shell."
> > which
> > contradicts the only limitation I could find of system LIST on Win32,
> > that
> > it may fall back to the shell.
> 
> Perhaps I should have expanded on that.
> 
> The common limitation with list system and list pipe open on Win32 is
> that they depend on the child process parsing the supplied command-
> line in a particular way, ie. the same way as the VC++ runtime (and
> presumably as CommandLineToArgvW ()), but there's no requirement that
> the child process does so.
> 
> There's also one very important child process that doesn't parse the
> command-line that way - the shell.
> 
> On POSIX systems the low-level API that creates a process accepts an
> array of arguments which are then passed to the child process with no
> parsing involved.
> 
> The limitation specific to list pipe open is it never falls back to
> the shell, since the shell uses it's own escaping mechanism for the
> command-line.
> 
> See https://rt.perl.org/Ticket/Display.html?id=123638 for why it's a
> problem.
> 
> Tony

Thanks. Do you have any recommendation for what perlport should say here for Win32, instead of the current entry? Should the perlport entry for Win32 system/exec also be amended?

-Dan


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=134046

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About