Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: POE::Wheel::Run & Tk Problems

by rcaputo (Chaplain)
on Aug 05, 2009 at 04:22 UTC ( [id://785966]=note: print w/replies, xml ) Need Help??


in reply to POE::Wheel::Run & Tk Problems - Solved

The last time I looked (which I admit is forever ago), "dir" was not a program in Windows (or DOS before it). Rather, it's a built-in shell command. You should try some actual program that will emit console output, but to be honest I don't know one off the top of my head.

Alternatively, I'm pretty sure CMD.EXE (your shell) has some options to execute built-in commands. I just don't know what they are these days.

It may also be worth testing whether you can execute batch files without starting a new shell.

Of course, it may be something completely different, but that's where I'd start.

Replies are listed 'Best First'.
Re^2: POE::Wheel::Run & Tk Problems
by Khen1950fx (Canon) on Aug 05, 2009 at 06:25 UTC
    Your post piqued my curiosity. I haven't used Windows in 10 years, so I thought I'd do a little review. I started with the dir command. Evidently, DOS does have a dir command. You can see it's documentation for 95, 98, ME here.

    Linux has a dir command also, but I'm not sure if all distros have it. The dir command appears to be just like ls, and it's written by the authors of ls, Richard Stallman and David MacKenzie.

    Update: It works on Vista too.

      Well, sure. It would be silly for an operating system to be unable to list directory contents. CMD.EXE has a built-in "dir" command, but there is no actual DIR.EXE or DIR.COM program in the version I just checked.

      Nevertheless, system() seems able to execute shell built-ins on Windows:

      C:\>perl -wle "system('set')" ALLUSERSPROFILE=C:\Documents and Settings\All Users
      Whereas this sort of thing fails in UNIX:
      % perl -wle 'system "set"' Can't exec "set": No such file or directory at -e line 1.

Re^2: POE::Wheel::Run & Tk Problems
by Anonymous Monk on Aug 05, 2009 at 06:30 UTC
    The program works for me (activeperl 5.8.9, winxp), in that it starts, pops up a window, and console shows dir output, then after pid -1492 closed all pipes., it segfaults.
      If I remember correctly, you may have to invoke the "Program Compatibilty Advisor" on XP and Vista. Try that.
        If I remember correctly, you may have to invoke the "Program Compatibilty Advisor" on XP and Vista. Try that.

        Um, no, you're completely off base here :)

      Thank you for this feedback. When I run it, I don't see the dir output on the console (like I do when the use Tk is commented out). This may point to a version problem.

      I'm on winxp activeperl 5.8.9 build 825 (288577), using POE 1.006 and POE::Wheel::Run 0.16.

      I may try upgrading to POE 1.007 and see if that helps.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://785966]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-24 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found