>      You can run a command in the background with:
> 
>          system("cmd &");

Oh I remember this. Yes, but now my env has:
LD_PRELOAD=/lib/libthread.so.1
which is required for DBD::Oracle.
And when I run "testexec1.pl", I get core dump.
I can do it when I reset:
LD_PRELOAD=;export LD_PRELOAD
But I cannot connect to Oracle.

I've found Proc::Spawn in CPAN, may help.

#!/usr/local/bin/perl
#-------------------------------------
# file: testexec1.pl
#-------------------------------------
print ">> $0 start...\n";
print ">> $0 exec testexec2.pl... with &\n";
system('testexec2.pl AAAA &');
print ">> $0 end exec testexec2.pl...\n";
exit;
#####

#!/usr/local/bin/perl
#-----------------------------------------
# file: testexec2.pl
#-----------------------------------------
$arg = shift @ARGV;
print ">> $0 start... arg=$arg\n";
print ">> $0 sleep 10 sec...\n";
sleep 15;
open(TXT, ">AAAA") or die "open err $!\n";
print TXT "$arg\n";
close(TXT);
print ">> $0 end ...\n";
exit;
#####

Regards,
Hirosi Taguti
[EMAIL PROTECTED]
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to