delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Date: | Thu, 12 Jan 2006 08:21:13 -0800 |
From: | David Rothenberger <daveroth AT acm DOT org> |
Subject: | Re: bash 3.1-1 "exec -l" doesn't start login shell |
In-reply-to: | <011220060506.5714.43C5E3CA000C73CE0000165222064246130A050E040D0C079D0A@comcast.net> |
To: | cygwin AT cygwin DOT com |
Message-id: | <43C681F9.5000506@acm.org> |
MIME-version: | 1.0 |
References: | <011220060506 DOT 5714 DOT 43C5E3CA000C73CE0000165222064246130A050E040D0C079D0A AT comcast DOT net> |
User-Agent: | Thunderbird 1.5 (Windows/20051201) |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 1/11/2006 9:06 PM, Eric Blake wrote: >> "exec -l" in bash 3.1-1 doesn't seem to start a login shell. This >> prevents my chere commands from starting a login shell, too. > > I couldn't reproduce the failure; can you provide more details? > Here's what I tried: > [snip program] > > So exec -l is correctly prepending the '-' to argv[0]. Is you > question about bash not behaving as a login shell when > invoked with argv[0] set to "-bash"? I guess so. > Have you tried "bash --login" instead? "bash --login" works fine, but the problem with "-bash" prevents chere from starting login shells. It may be possible to modify chere to use "bash --login", but this is still a bash bug, right? As I said, I noticed the problem first with chere. I confirmed the problem by adding echo "`date` ~/.profile" >> /tmp/dotfile at the top of ~/.profile. When I start a shell with "bash --login", I see the current date/time added to /tmp/dotfile. If I execute "exec -l /bin/bash", no entry is added to /tmp/dotfile with 3.1-1. An entry is added with 3.0-14. -- David Rothenberger spammer? -> spam AT daveroth DOT dyndns DOT org GPG/PGP: 0x92D68FD8, DB7C 5146 1AB0 483A 9D27 DFBA FBB9 E328 92D6 8FD8 Your program is sick! Shoot it and put it out of its memory. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |