On Thu, 2002-06-20 at 23:30, Langa Kentane wrote:
> Greetings,
> I wish to use the fork() function on one of my scripts. I would like more
> clarity on the way it works.
>
> Take for instance the ff code:
>
> Sub mysub
> {
> while (<THATFILE>)
> If ($_ eq "SCANME")
> {
> fork()
> system("nessus" "thathost");
system() does an implicit fork(), so you don't have to do the fork()
yourself
> print "Forked!\n";
> }
> Else
> {
> fork()
> system("nmap", "-sS", "-T", "insane", "mynetwork")
> print "Forked on else\n";
> }
> close THATFILE;
> }
>
> What I would like to know when I do the fork on the if statement, does the
> child just do the stuff under if block & exit??
> What happens exactly? Is this the right way of doing this?
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]