Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

by chessgui (Scribe)
on Jan 25, 2012 at 03:04 UTC ( #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',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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://949809]
and the monks are mute...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2018-03-18 09:01 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (229 votes). Check out past polls.