On 2/26/04 11:24 AM, "Sherm Pendley" <[EMAIL PROTECTED]> wrote:
> On Feb 26, 2004, at 11:14 AM, Riccardo Perotti wrote: > >> Can somebody point me in the right direction and / or contribute an >> idea for >> this? > > Have a look at the man page for the 'killall' command. In short, it > signals processes by name, so you don't need to know the PID. You can > use system() to run it from Perl, like this: > > #!/usr/bin/perl > > use warnings; > use strict; > > system 'killall -KILL pppd'; > > sherm-- > > Thanks Sherm! That definitely looks like "a step in the right direction". Now the only problem is that 'pppd' a process owned by root. Should my script be run as 'root'? That sounds kind of dangerous! ... can it / should it be done? When at the Terminal I have to 'sudo kill' and the get asked my password. How would I do a 2 step process from 1 perl script? Thanks again! Riccardo -- mailto:[EMAIL PROTECTED] http://www.riccardoperotti.com