Your message dated Sun, 11 Sep 2005 16:10:53 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug#305485: bash: exec -a "name" does not rename $0 (forwarded 
from [EMAIL PROTECTED])
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Apr 2005 09:26:45 +0000
>From [EMAIL PROTECTED] Wed Apr 20 02:26:45 2005
Return-path: <[EMAIL PROTECTED]>
Received: from smtp10.wanadoo.fr [193.252.22.21] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DOBTp-0005bq-00; Wed, 20 Apr 2005 02:26:45 -0700
Received: from me-wanadoo.net (localhost [127.0.0.1])
        by mwinf1009.wanadoo.fr (SMTP Server) with ESMTP id 9158F280015A
        for <[EMAIL PROTECTED]>; Wed, 20 Apr 2005 11:26:13 +0200 (CEST)
Received: from argos.server.maison (AToulouse-152-1-9-58.w82-125.abo.wanadoo.fr 
[82.125.7.58])
        by mwinf1009.wanadoo.fr (SMTP Server) with ESMTP id 66C942800148;
        Wed, 20 Apr 2005 11:26:13 +0200 (CEST)
X-ME-UUID: [EMAIL PROTECTED]
Received: from prahal by argos.server.maison with local (Exim 4.50)
        id 1DOBTh-0006OC-7k; Wed, 20 Apr 2005 11:26:37 +0200
Date: Wed, 20 Apr 2005 11:26:37 +0200
From: [EMAIL PROTECTED]
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: bash: exec -a "name" does not rename $0
Message-ID: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 3.9
Sender: [EMAIL PROTECTED]
User-Agent: Mutt/1.5.9i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.4 required=4.0 tests=BAYES_00,HAS_PACKAGE,
        NO_REAL_NAME autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: bash
Version: 3.0-14
Severity: normal


as a test case i createa bash script:

#!/bin/bash
echo $0

and call it :
$ (exec -a "name" ./a)
the output is "./a"


I fee the severity of this bug is normal though it may be a
problem having a bug in such a core function of bash.


Is it really a bug or is the feature obsolete ?

Greetings
Alban


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-rc5
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages bash depends on:
ii  base-files              3.1.2            Debian base system miscellaneous f
ii  libc6                   2.3.5-1          GNU C Library: Shared libraries an
ii  libncurses5             5.4-4            Shared libraries for terminal hand
ii  passwd                  1:4.0.3-31sarge3 change and administer password and

-- no debconf information


---------------------------------------
Received: (at 305485-done) by bugs.debian.org; 11 Sep 2005 14:10:58 +0000
>From [EMAIL PROTECTED] Sun Sep 11 07:10:58 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mail.cs.tu-berlin.de [130.149.17.13] (root)
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EESXp-0003xF-00; Sun, 11 Sep 2005 07:10:57 -0700
Received: from mailhost.cs.tu-berlin.de ([EMAIL PROTECTED] [130.149.17.13])
        by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id QAA25905;
        Sun, 11 Sep 2005 16:10:55 +0200 (MEST)
Received: from localhost (localhost [127.0.0.1])
        by mailhost.cs.tu-berlin.de (Postfix) with ESMTP id 52948FD4B;
        Sun, 11 Sep 2005 16:10:55 +0200 (MEST)
Received: from mailhost.cs.tu-berlin.de ([127.0.0.1])
 by localhost (bueno [127.0.0.1]) (amavisd-new, port 10224) with ESMTP
 id 23674-03; Sun, 11 Sep 2005 16:10:54 +0200 (MEST) 11346
Received: from bolero.cs.tu-berlin.de (bolero.cs.tu-berlin.de [130.149.19.1])
        by mailhost.cs.tu-berlin.de (Postfix) with ESMTP;
        Sun, 11 Sep 2005 16:10:54 +0200 (MEST)
Received: (from [EMAIL PROTECTED])
        by bolero.cs.tu-berlin.de (8.12.10+Sun/8.12.8/Submit) id j8BEAseG002455;
        Sun, 11 Sep 2005 16:10:54 +0200 (MEST)
From: Matthias Klose <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[EMAIL PROTECTED]>
Date: Sun, 11 Sep 2005 16:10:53 +0200
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Bug#305485: bash: exec -a "name" does not rename $0 (forwarded 
from [EMAIL PROTECTED])
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Chet Ramey writes:
> Matthias Klose wrote:
> 
> > as a test case i createa bash script:
> > 
> > #!/bin/bash
> > echo $0
> > 
> > and call it :
> > $ (exec -a "name" ./a)
> > the output is "./a"
> > 
> > 
> > I fee the severity of this bug is normal though it may be a
> > problem having a bug in such a core function of bash.
> > 
> > 
> > Is it really a bug or is the feature obsolete ?
> 
> Neither.  Bash really does invoke the command with argv[0] set
> to "name".  However, it's an executable shell script, so the kernel
> actually turns the command into "/bin/bash ./a".  At that point,
> normal shell script processing takes over, and $0 is set to the
> name of the script.
> 
> The same thing happens if you omit the leading `#!/bin/bash', since
> POSIX requires bash to behave the way the kernel does.
> 
> Chet
> -- 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ( ``Discere est Dolere'' -- chet )
>                                               Live Strong.
> Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    
> http://cnswww.cns.cwru.edu/~chet/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to