This is the mail archive of the
mailing list for the Cygwin project.
Re: bash 3.1-1 "exec -l" doesn't start login shell
- From: Dave <d_inabox at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 13 Jan 2006 14:53:08 -0800 (PST)
- Subject: Re: bash 3.1-1 "exec -l" doesn't start login shell
David Rothenberger wrote:
> 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.
>> 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?
chere could indeed be modified to do that. However prepending '-' is (currently)
the only method of invoking a login shell which works across all the packaged
So I went ahead and installed 3.1-1 to try it out. Here's what I found:
chere did indeed stop working as advertised. Further experiments from a command
bash-3.1$ exec -l bash
login shell executed (PS1 evaluated). Attempting the verbatim line from chere:
bash-3.1$ exec -l /bin/bash
I haven't checked $0, but I'm guessing it's something like -/bin/bash, and this
isn't triggering a login shell.
chere passes the full path to the executable in case the shell isn't in the
path. I can't remember if this was absolutely necessary, but it certainly works
with the other shells. e.g
bash-3.1$ exec -l /bin/zsh
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html