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


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@daveroth.dyndns.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/


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