Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261210AbTEHIZg (ORCPT ); Thu, 8 May 2003 04:25:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261212AbTEHIZg (ORCPT ); Thu, 8 May 2003 04:25:36 -0400 Received: from madrid10.amenworld.com ([217.174.194.138]:64785 "EHLO madrid10.amenworld.com") by vger.kernel.org with ESMTP id S261210AbTEHIZf (ORCPT ); Thu, 8 May 2003 04:25:35 -0400 Date: Thu, 8 May 2003 10:22:52 +0200 From: DervishD To: Glenn McGrath Cc: linux-kernel@vger.kernel.org Subject: Re: [patch] set argv[0] of init process to filename Message-ID: <20030508082252.GG68@DervishD> References: <20030508145412.5d98ba5c.bug1@optushome.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20030508145412.5d98ba5c.bug1@optushome.com.au> User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 Lines: 35 Hi Glenn :) * Glenn McGrath dixit: > This current behaviour is inconvenient for busybox > (www.busybox.net) as it uses argv[0] to determine functionality. I had a similar problem with my init clone (a virtual console init+getty+login for embedded systems) with the same issue. I wanted to change the argv[0] for spawned processes for chaging the name that the ps command will show. At the end I assumed that the shortest name possible was 'init' and that I had four characters at least... If the space is shorter, less characters are used. > The attached patch against 2.4.20 sets argv[0] to the filename > being run as the init process, it results in marginally smaller > binary (12 bytes). IMHO this is a good thing, I hope it gets included, since in the general case it won't do any harm (IMHO, again). Let's see what says Marcelo. > Is there a reason why argv[0] should always be set to "init" ? Don't know :?? Ra?l N??ez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/