Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 2002 17:11:45 +0200 (CEST)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: killing an application through code
Message-ID:  <200210041511.g94FBj4n059164@lurza.secnetix.de>
In-Reply-To: <20021004150100.GB1537@raggedclown.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Cliff Sarginson <cls@raggedclown.net> wrote:
 > On Fri, Oct 04, 2002 at 04:31:49PM +0200, Oliver Fromme wrote:
 > > 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.
 > 
 > 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.

Sure, but he was talking about Realplayer.  I doubt he has
control over that one.  :-)

Well, okay, he could write a wrapper script that runs the
application (Realplayer or whatever) in the background and
records the PID somewhere.  But that's not always possible.

Regards
   Oliver

PS:  Please respect the Reply-To header.

-- 
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?200210041511.g94FBj4n059164>