From owner-freebsd-questions Tue Oct 1 10: 2:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96A7537B401 for ; Tue, 1 Oct 2002 10:02:44 -0700 (PDT) Received: from casper.sri.com (casper.SRI.COM [128.18.243.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 8F26243E6E for ; Tue, 1 Oct 2002 10:02:43 -0700 (PDT) (envelope-from hogsett@csl.sri.com) Received: (qmail 14037 invoked from network); 1 Oct 2002 17:06:22 -0000 Received: from localhost (HELO casper.SRI.COM) (127.0.0.1) by casper.sri.com with SMTP; 1 Oct 2002 17:06:22 -0000 Received: from quarter.csl.sri.com ([130.107.1.30]) by casper.SRI.COM (NAVGW 2.5.1.18) with SMTP id M2002100110062103890 ; Tue, 01 Oct 2002 10:06:21 -0700 Received: from axp.csl.sri.com (axp.csl.sri.com [130.107.2.30]) by quarter.csl.sri.com (8.12.4/8.12.4) with ESMTP id g91H2gnr027594; Tue, 1 Oct 2002 10:02:42 -0700 Received: from axp.csl.sri.com (localhost [127.0.0.1]) by axp.csl.sri.com (8.12.3/8.12.3) with ESMTP id g91H2gZN051898; Tue, 1 Oct 2002 10:02:42 -0700 (PDT) (envelope-from hogsett@axp.csl.sri.com) Message-Id: <200210011702.g91H2gZN051898@axp.csl.sri.com> To: Vinod Cc: freebsd-questions@FreeBSD.ORG Subject: Re: killing an application through code In-Reply-To: Message from Vinod of "Tue, 01 Oct 2002 09:55:32 PDT." <20021001165532.97187.qmail@web21109.mail.yahoo.com> Mime-Version: 1.0 (generated by tm-edit 8.8 (Time Passed Me By)) Content-Type: text/plain; charset=US-ASCII Date: Tue, 01 Oct 2002 10:02:42 -0700 From: Mike Hogsett Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG man killall > Can anyone tell me how i can kill an application > process through a piece of C code? > > i have the realplayer application,which has to be > closed manually with a mouse or using "ctrl-C" or > using "kill pid". > But how can i kill it through a piece of code? > one way is to execute "ps" and then grep 'realplay' > from it and get the pid and kill it.Isn't there any > other way i can do this? isn't there something which > kills from command name like 'kill realplay'? > > Thanks in advance, > Vinod > > > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message