From owner-freebsd-questions Tue Oct 1 9:55:38 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 316CA37B401 for ; Tue, 1 Oct 2002 09:55:37 -0700 (PDT) Received: from web21109.mail.yahoo.com (web21109.mail.yahoo.com [216.136.227.111]) by mx1.FreeBSD.org (Postfix) with SMTP id 077BD43E6E for ; Tue, 1 Oct 2002 09:55:37 -0700 (PDT) (envelope-from geekvinod@yahoo.com) Message-ID: <20021001165532.97187.qmail@web21109.mail.yahoo.com> Received: from [152.15.26.29] by web21109.mail.yahoo.com via HTTP; Tue, 01 Oct 2002 09:55:32 PDT Date: Tue, 1 Oct 2002 09:55:32 -0700 (PDT) From: Vinod Subject: killing an application through code To: freebsd-questions@freebsd.org 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 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