Hi Sir,
some answers in a haphazard manner (:D) :
> I am trying to spawn a program from my perl script - and later on I
> would like to kill it. How do I go about doing this?
I would personally prefer a child to die itself rather than be killed. In
this case a simple system would do all the work :-)
> I was researching the "fork" command - but
> had completely no idea about what the manpage was talking about.
I am not sure if fork can be used here. AFAIK it spawns the same program
again (process similar to this one as Perldoc says)
> And later, when it is time to kill the process:
> my $pid = `ps -aef | grep $command | grep -v grep | awk \'{print \$2}\'`;
> kill 9, $pid;
Probably killall <http://linux.die.net/man/1/killall> will get the job
done??
--
Lots o' Luv,
Phani Bhushan
Let not your sense of morals prevent you from doing what is right - Isaac
Asimov (Salvor Hardin in Foundation and Empire)
--~--~---------~--~----~------------~-------~--~----~
Do you have another question? Click here -
http://groups.google.com/group/iitdlug/post
l...@iitd community mailing list -- http://groups.google.com/group/iitdlug
-~----------~----~----~----~------~----~------~--~---