Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: ActivePerl - perl.exe works, wperl.exe does not...

by chessgui (Scribe)
on Jan 25, 2012 at 03:04 UTC ( [id://949809]=note: print w/replies, xml ) Need Help??


in reply to ActivePerl - perl.exe works, wperl.exe does not...

I've had a similar problem with wperl (I think it has nothing to do with ActiveState - it fails on Strawberry as well). In my particular case it was an Open2 call that hanged wperl.

The workaround was to create a script which does nothing else but launches perl.exe without a window through create process with creation flag 'CREATE_NO_WINDOW'. You run this script via wperl.exe instead of your original prog.

Mine is a Win32 solution: I don't know whether any similar thing works on Unix/Linux or not.

The launching script:

se Win32::Process; Win32::Process::Create($perl,'c:\strawberry\perl\bin\perl.exe','perl.e +xe my_original_prog.pl',0,CREATE_NO_WINDOW,'.');


The only modification to the original program itself that you include the following lines:

use Win32 qw(SW_HIDE); Win32::SetChildShowWindow(SW_HIDE);


From here on no window is created (not even for child processes opened with Open2) and the main program is safe since it is run via perl.exe.

Replies are listed 'Best First'.
Re^2: ActivePerl - perl.exe works, wperl.exe does not...
by spstansbury (Monk) on Jan 26, 2012 at 18:45 UTC

    Thanks for the resonse!

    I'll give this a try. Scott...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-03-28 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found