ActiveState Perl 5.10 on Windows XP - can't shell!!??

P

Perl Junkie

Searched high and low on this and have found absolutely nothing. It's
so bizarre. I've never actually heard of this happening anyway.
(It's Windows, so there's half of the problem there, IMO...)

Running ActiveState Perl v5.10 on Windows XP. All of a sudden, for
seemingly no reason at all (of course none that I know about), I can't
shell out of Perl. For instance:

C:\> perl -e "$dir = `dir`; print $dir;"

Prints nothing. The `dir` doesn't happen. I've tried using qx{} as
well. I have Cygwin running on my machine and it works fine using
Cygwin Perl v5.10. But not under ActiveState. I checked with our
security group and as far as they know, no restrictions are being made
on system() or shell calls on software on our systems. I tried
installing/upgrading to AS Perl v5.12 -- the latest -- but still can't
seem to shell.

Anyone else run into this? It's so bizarre, I can't even conceive of
what would be blocking this.

-pj
 
P

Perl Junkie

Quoth Perl Junkie <[email protected]>:









Do you have either COMSPEC or PERL5SHELL set to something weird in the
environment? Are you attempting to do any of this from a non-standard
terminal emulator (such as 4NT)?

What do you get if you run

    perl -le "system 'dir'; print ":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:"

Result is:

:65280:65280:No such file or directory:The filename or extension is
too long:

But $! isn't alwaya reset. I was getting "Bad filename descriptor" at
one point in time. Interestingly, we used similar delimiters for a
similar command I also issued. :) Freaky how techs think. :)

I'm still submarined. (Man, I hate Windows, but there's no choice in
the matter here.)

-PJ
 
S

sln

Searched high and low on this and have found absolutely nothing. It's
so bizarre. I've never actually heard of this happening anyway.
(It's Windows, so there's half of the problem there, IMO...)

Running ActiveState Perl v5.10 on Windows XP. All of a sudden, for
seemingly no reason at all (of course none that I know about), I can't
shell out of Perl. For instance:

C:\> perl -e "$dir = `dir`; print $dir;"

I have no problem running this from my command line.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\temp>perl -v

This is perl, v5.10.0 built for MSWin32-x86-multi-thread
(with 5 registered patches, see perl -V for more detail)

Copyright 1987-2007, Larry Wall

Binary build 1004 [287188] provided by ActiveState http://www.ActiveState.com
Built Sep 3 2008 13:16:37

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

-sln
 
S

sln

Do you have either COMSPEC or PERL5SHELL set to something weird in the
environment? Are you attempting to do any of this from a non-standard
terminal emulator (such as 4NT)?

What do you get if you run

perl -le "system 'dir'; print ":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:"

This is not quoted properly

perl -le "system 'dir'; print \":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:\""

Even fixed, it just shows the directory, then some junk at the end
:0::No such file or directory::

-sln
 
W

Wolf Behrenhoff

I presume since you didn't answer that these are all 'no's?

I agree, this is an important question.
Something else you could try: can you start processes with
Win32::process? That's a good deal closer to CreateProcess(3), so it
might give us some idea of where the problem is. (It also might give an
accurate error indication that hasn't been stomped on by some other
code.)

Hm... indeed very strange. As Ben mentioned CreateProcess, another idea
came to my mind. Is a "Personal Firewall" installed on your machine or
any other "security" software? If yes, that could be the cause for these
problems.

Wolf
 
P

Perl Junkie

I agree, this is an important question.

FYI, I re-quoted this with qq{} first before running. Yes, as it was
originally submitted, it had quoting issues.
Hm... indeed very strange. As Ben mentioned CreateProcess, another idea
came to my mind. Is a "Personal Firewall" installed on your machine or
any other "security" software? If yes, that could be the cause for these
problems.

No firewalls or anything. I'm over here doing the same thing --
thinking something was installed on my machine... a patch? ...a new
GPO? ...a new setting in McAfee? I mean, it just STOPPED WORKING and
it makes NO SENSE.

The Win32::process idea is a good idea. I'll try that. Otherwise, I
may have to actually reimage my machine over this. Another notch in
my "Why I hate Windows" belt...

-pj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top