On Fri, Oct 04, 2002 at 04:31:49PM +0200, Oliver Fromme wrote:
> Mike Hogsett <[EMAIL PROTECTED]> wrote:
>  > 
>  > > Can anyone tell me how i can kill an application
>  > > process through a piece of C code?
>  > 
>  > man killall
> 
> He was asking for C code.  Well, in C, the easiest way
> is probably to go through the procfs(5) filesystem to
> find the PID and then use the kill(2) system call.  This
> isn't portable, though, but I don't think that there is
> a portable way to do it.
> 
> Regards
>    Oliver
> 
Well if he has control over the application he could make it record it's
pid somewhere as many system programs do, and use that. He should bear
in mind of course he will only be able to kill them stone dead if he
owns them or is root. This is definitely portable !

-- 
Regards
   Cliff Sarginson 
   The Netherlands

       Email: [EMAIL PROTECTED]
       Tel  : +31 (0)10 4764595

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to