SPUG: SUMMARY: Win32::Process

North, Walter wnorth at state.mt.us
Mon Jun 18 15:51:47 CDT 2001

Original post below summary:

Thanks to 
Charles DeRykus and Andrew Sweger

Adding import Win32::Process did the trick.

And its good to know where I can look up more info on this as well

thank you again

Greetings from Montana.

I have a perl script which runs on Unix/Linux/Widoze

I wanted to use Win32::Process if it was running on a Windows box.

So, I put in, after many foulups

use POSIX qw(uname);
($kernel, $hostname, $release, $version, $hardware) = uname();
        if ( $kernel eq "Windows NT") {
        require Win32::Process;

Everything seemed ok, but apparently some of the module did not load or
loaded wrong and the script now hangs up whilst running 

  $Result = Win32::Process::Create ( $Process, $HARBORCMD, $CMDLINE,
$bInherit, $Flags, $HAR
  if ( $Result ) { print "$MSG\n"; $Process->Wait(INFINITE); }
  else { print "Error: " . Win32::FormatMessage( Win32::GetLastError() ); }

A collegue who is more NT knowledgable then me assures me it is the
Wait(INFINITE) part that is not working.  ie it goes out and waits
infinitely and never returns.

Note:  If instead of BEGIN I used use Win32::Process the script worked, but
not on a unix box cause there is no Win32::Process module.

So, finally the question:

Is there a problem with Win32::Process, or is my code with the Wait in it

thanks much

Walter North 406-444-2914 
Operating Systems Programmer 
wnorth at state.mt.us

"Confound these ancestors.... 
They've stolen our best ideas!"
- Ben Jonson

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/

More information about the spug-list mailing list