From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 7 21:17:14 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFE39106566B for ; Sat, 7 Nov 2009 21:17:14 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id A894F8FC16 for ; Sat, 7 Nov 2009 21:17:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 0B92014D9B57; Sat, 7 Nov 2009 22:17:14 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id at5-ncqAZS1F; Sat, 7 Nov 2009 22:17:11 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 6438014D9B52; Sat, 7 Nov 2009 22:17:11 +0100 (CET) Message-ID: <4AF5E3D5.3050009@FreeBSD.org> Date: Sat, 07 Nov 2009 22:17:09 +0100 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Jilles Tjoelker References: <20091106222446.GB60707@stack.nl> <20091107112832.24b0c0d4@ernst.jennejohn.org> <20091107130136.GI2331@deviant.kiev.zoral.com.ua> <20091107201954.GA84099@stack.nl> In-Reply-To: <20091107201954.GA84099@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Kostik Belousov , freebsd-hackers@freebsd.org Subject: Re: [patch] add pwait utility X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2009 21:17:15 -0000 Jilles Tjoelker escribió: >> And it seems to make sense to add this functionality to pkill/pgrep >> binary, creating another hardlink to it. >> > > Hmm, pwait's syntax is incompatible: it takes pids (pkill says: use > kill) and the -v option does something totally different. > That's not an issue. You can declare extern char *__progname; and use it to parse the command line arguments in a different way. Of course, it only makes sense if pkill/pgrep has some inner functionality you can make use of to avoid duplication. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org