X-Spam-Check-By: sourceware.org Date: Thu, 12 Jan 2006 08:21:13 -0800 From: David Rothenberger 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 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit 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 Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/