This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

--- start
bash-3.1$ exec -l bash

d_inabox@minime ~
--- end

login shell executed (PS1 evaluated). Attempting the verbatim line from chere:

--- start
bash-3.1$ exec -l /bin/bash
--- end

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

(d_inabox@minime)[1] ~


chere maintainer

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]