Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

WIN32 exec mystery

by major tom (Novice)
on Jul 02, 2002 at 18:10 UTC ( [id://178936] : perlquestion . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my $prg='"c:/winnt/notepad.exe"'; #CONSOLE WINDOWS IS NOT CLOSED
      my $prg='c:/winnt/notepad.exe'; #CONSOLE WINDOWS IS CLOSED
    
  2. or download this
    my $prg='"c:/winnt/notepad.exe"'; #CONSOLE WINDOWS IS NOT CLOSED
    #my $prg='c:/winnt/notepad.exe'; #CONSOLE WINDOWS IS CLOSED
     
    ...
    print "\nKill self (parent, that is) to close CONSOLE window";
    kill 'STOP',$$; 
    exit(0);
    
  3. or download this
    sub REAPER
    {
      $waitedpid=wait;
    ...
    }
    
      $SIG{'CHLD'}=\&REAPER;