-
September 19th, 2001, 07:47 AM
#1
Junior Member
Help me with PERL !!!
Can u guys help me with PERL? My problem is quite simple : I want to create a new process in a PERL program and pass it arguments. It is something like this :
system('/MyDir/MyProg.pl $arg1 $arg2 &');
I don't know what's wrong with this! So if u've got an idea I will be glad if share it with me...
-
September 19th, 2001, 01:10 PM
#2
Junior Member
PERL help
maybe this might help :
$stat = system($program, $arg1, $arg2);
die "$program died: $?" unless $stat == 0;
cheerio
eSkImO
\"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.\" --George Bernard Shaw
-
September 20th, 2001, 07:48 AM
#3
Junior Member
More precisely...
Well I thank you for the tip. But more precisely, what I'm looking for is :
--> creating a child process with arguments
--> that the parent process doesn't wait for the ending of its child
--> when the child is ended he terminates himself
I think it's possible but I can't grab the right command...
-
September 20th, 2001, 08:26 AM
#4
Member
Not too sure about "Perl", but, concept that you're looking for is called "forking". In C, when you fork() a process the child acts as an indepdent process from the parent, inheriting the parents permissions. Maybe with that you'll be able to search http://www.google.com for a tutorial, or information on how to fork() processes in Perl
Jason Parker - http://www.o-negative.net
o-Negative: Information Network
-
September 25th, 2001, 06:05 PM
#5
Junior Member
heres the info at perl monks.
but beware of zombies!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|