> -----Original Message-----
> From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 16, 2001 4:34 AM
> To: [EMAIL PROTECTED]
> Subject: RE:Kill a process
> 
> 
> Hi, I wonder how can I know if a process for exemple dhcpd is 
> running and if it 
> is how can I kill it in Perl.
> Thanks

If you know the PID, Perl has a kill() function:

perldoc -f kill

To find the PID is trickier. Some daemons write their pid to a file.
For others, parsing the output of ps is probably the best way to go,
but even that tends to be highly OS-specific.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to