in reply to two questions about Win32::Process
This module is design for call external programs (not created with perl)... Try use Perl's language and resources to do it.
See perlipc's Background-Process and fork references.
Skel code:
use strict; use warnings; my $pid = fork(); unless ( defined($pid) ) { die "fork failure! "; elsif ( $pid ) { # child $SIG{HUP} = sub { print "HUP signal\n"; }; sleep(5); #-->> if use an external script, and not a file with parameters #>>>> reguire 'c:\perl\progs\garbl.pl'; exit 1; } sleep(2); kill(15,$pid);
other resources: waitpid, wait, alarm...
--
Marco Antonio
Rio-PM
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: two questions about Win32::Process
by dannoura (Pilgrim) on Apr 29, 2005 at 23:42 UTC |