From owner-freebsd-questions Tue Oct 1 9:56:39 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 2FA3D37B401 for ; Tue, 1 Oct 2002 09:56:38 -0700 (PDT) Received: from buffnet4.buffnet.net (buffnet4.buffnet.net [205.246.19.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A1FC43E3B for ; Tue, 1 Oct 2002 09:56:37 -0700 (PDT) (envelope-from shovey@buffnet.net) Received: from buffnet11.buffnet.net (buffnet11.buffnet.net [205.246.19.55]) by buffnet4.buffnet.net (8.9.3/8.8.7) with ESMTP id MAA11995; Tue, 1 Oct 2002 12:56:42 -0400 (EDT) (envelope-from shovey@buffnet.net) Date: Tue, 1 Oct 2002 12:56:31 -0400 (EDT) From: Stephen Hovey To: Vinod Cc: freebsd-questions@FreeBSD.ORG Subject: Re: killing an application through code In-Reply-To: <20021001165532.97187.qmail@web21109.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 If there is only 1 or you wanna kill whatever there is killall realplay On Tue, 1 Oct 2002, Vinod wrote: > 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