New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No die on open pipe to unknown program #11407
Comments
From nmqrstx-18@yahoo.deHi, Perl-Version This is perl, v5.6.1 built for MSWin32-x86-multi-thread Copyright 1987-2001, Larry Wall Binary build 638 provided by ActiveState Corp. http://www.ActiveState.com Perl may be copied only under the terms of either the Artistic License or Complete documentation for Perl, including FAQ lists, should be found on OS: Win32 XP 5.1 SP " Issue: expecting: die my $fh = undef; No die() but a error-Message from OS: Thats all, thank you! Rolf http://rolfrost.de/ |
From @Abigail5.6.1 is a very old Perl; released over a decade ago. 5.14 is the current Having said that, I cannot reproduce this using 5.6.2 (but I'm using a Can you reproduce your error on 5.14? Abigail |
The RT System itself - Status changed from 'new' to 'open' |
From @ikegamiOn Sat, Jun 4, 2011 at 8:16 PM, Abigail <abigail@abigail.be> wrote:
On Windows, the single-argument form of C<system> invokes the shell if the
This allows shell builtins (dir, copy) to be callable as executables.
C<open> pipes appear to work the same way.
|
From @ikegamiOn Sat, Jun 4, 2011 at 2:50 PM, Rolf Rost <perlbug-followup@perl.org> wrote:
It didn't die because the child, a shell, was successfully launched. You don't detect the error because you didn't check if the child succeeded |
From @ikegamiOn Sat, Jun 4, 2011 at 8:16 PM, Abigail <abigail@abigail.be> wrote:
Try running a command with C<"> in it. $ perl -E'open(my |
From @cpansproutOn Sat Jun 04 21:52:50 2011, ikegami@adaelis.com wrote:
Does that mean this is not a bug? |
From @ikegamiOn Sun, Jun 5, 2011 at 4:47 PM, Father Chrysostomos via RT <
This is a discrepancy with the docs. From C<exec>, If there is only one scalar argument or an array with one element in it, the There is no shell meta characters in the OP's example, yet a shell is used. If there is only one scalar argument or an array with one element in it, the But it could also be viewed as a code bug. Does anyone have an opinion? I Note that the observed behaviour is probably a side-effect of the bug where # Executes 'dir' even though it shouldn't. # At least this returns an error as it should (Tested recently, but not on my Windows machine right now.) |
I get this on linux
|
Win 10, Strawb 5.30: Executes 'dir' even though it shouldn't. Doesn't exec 'dir' (or at least output any results) but doesn't return an error either |
The matter at hand is 1) specific to Windows, and 2) specific to commands with no shell metacharacters. The behaviour observed by the OP is intentional in order to make built-in shell commands like The only issue is perhaps one of documentation. The docs for The docs for
This passage is missing from the docs for Options:
I vote for the latter. |
I do too. If someone disagrees we can re-open it. |
Migrated from rt.perl.org#92220 (status was 'open')
Searchable as RT92220$
The text was updated successfully, but these errors were encountered: