Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 2002 16:31:49 +0200 (CEST)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: killing an application through code
Message-ID:  <200210041431.g94EVn1R057459@lurza.secnetix.de>
In-Reply-To: <200210011702.g91H2gZN051898@axp.csl.sri.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Hogsett <hogsett@csl.sri.com> 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

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210041431.g94EVn1R057459>