Re: bash 3.1-1 "exec -l" doesn't start login shell

2006-01-13 Thread Dave
Eric wrote:
>According to David Rothenberger on 1/12/2006 9:21 AM:
> 
>> "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?
>
> Yes, it is a regression in bash 3.1, and Tim Waugh proposed a patch here:
> http://article.gmane.org/gmane.comp.shells.bash.bugs/8634
>
> I will include that, as well as official patches 2-5, when I next roll
> bash-3.1-2.

Argh. Crossed emails - that's what I get for reading the list on the web.

Thanks Eric.

Dave.

PS. Apologies for repeatedly killing the thread history. That's what I get with 
yahoo.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
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/



Re: bash 3.1-1 "exec -l" doesn't start login shell

2006-01-13 Thread Dave
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
shells.

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
prompt:

--- start
c:\cygwin\bin>bash
bash-3.1$ exec -l bash

[EMAIL PROTECTED] ~
$ 
--- end

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

--- start
c:\cygwin\bin>bash
bash-3.1$ exec -l /bin/bash
bash-3.1$
--- 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

--start
c:\cygwin\bin>bash
bash-3.1$ exec -l /bin/zsh

([EMAIL PROTECTED])[1] ~
$
---end

Regards,

Dave
chere maintainer

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
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/



Re: bash 3.1-1 "exec -l" doesn't start login shell

2006-01-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to David Rothenberger on 1/12/2006 9:21 AM:
> 
> "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?

Yes, it is a regression in bash 3.1, and Tim Waugh proposed a patch here:
http://article.gmane.org/gmane.comp.shells.bash.bugs/8634

I will include that, as well as official patches 2-5, when I next roll
bash-3.1-2.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDyCOP84KuGfSFAYARAiejAJ9D7xaaUBrWtcDhvfcE5VN4hDQp3ACeKdQQ
scYH2QrY32L7zOhG4V5lrtQ=
=WtU6
-END PGP SIGNATURE-

--
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/



Re: bash 3.1-1 "exec -l" doesn't start login shell

2006-01-12 Thread David Rothenberger
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 Rothenbergerspammer? -> [EMAIL PROTECTED]
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/



Re: bash 3.1-1 "exec -l" doesn't start login shell

2006-01-11 Thread Eric Blake
> "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:

$ cat foo.c
#include 
int main(int argc, char**argv) {
  return puts(argv[0]);
}
$ (exec foo)
foo
$ (exec -l foo)
-foo
$ echo $BASH_VERSION
3.1.1(1)-release

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"?  Have you tried
"bash --login" instead?

--
Eric Blake
volunteer cygwin bash maintainer

--- Begin Message ---

Cygwin Configuration Diagnostics
Current System Time: Wed Jan 11 15:41:12 2006

Windows XP Professional Ver 5.1 Build 2600 Service Pack 2

Path:   C:\cygwin\home\drothe\bin
C:\cygwin\usr\local\bin
c:\cygwin\bin
c:\jdk1.2.2\bin
c:\oracle\ora817\bin
c:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\program files\gpg-1.4.2
C:\cygwin\sbin
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Program Files\Executive Software\Diskeeper\
c:\MSSQL7\BINN
c:\Program Files\ATI Technologies\ATI Control Panel
c:\Program Files\QuickTime\QTSystem\
c:\Program Files\SSH Communications Security\SSH Secure Shell
C:\cygwin\lib\lapack

Output from c:\cygwin\bin\id.exe (nontsec)
UID: 1003(drothe)   GID: 513(None)
0(root) 513(None)   544(Administrators) 545(Users)

Output from c:\cygwin\bin\id.exe (ntsec)
UID: 1003(drothe)   GID: 513(None)
0(root) 513(None)   544(Administrators) 545(Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = `drothe'
PWD = `/c/temp'
CYGWIN = `server'
HOME = `/home/drothe'
MAKE_MODE = `unix'

HOMEPATH = `\Documents and Settings\drothe'
MANPATH = `/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man:/usr/X11R6/man'
APPDATA = `C:\Documents and Settings\drothe\Application Data'
SSH_AGENT_PID = `7712'
HOSTNAME = `tela'
ORA_HOME_WIN = `c:\oracle\ora817'
TERM = `xterm'
PROCESSOR_IDENTIFIER = `x86 Family 15 Model 2 Stepping 9, GenuineIntel'
WINDIR = `C:\WINDOWS'
PERLIO = `perlio'
TEXDOCVIEW_txt = `cygstart %s'
CVSROOT = `:ext:[EMAIL PROTECTED]:/home/drothe/cvsroot'
TEXDOCVIEW_dvi = `cygstart %s'
WINDOWID = `4734320'
OLDPWD = `/home/drothe'
USERDOMAIN = `TELA'
OS = `Windows_NT'
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
!:: = `::\'
LS_COLORS = 
`no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*.mpc=01;35:*.ogg=01;35:*.wav=01;35:'
TEMP = `/c/DOCUME~1/drothe/LOCALS~1/Temp'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
SSH_AUTH_SOCK = `/tmp/ssh-0dO2sxYorp/agent.4396'
QTJAVA = `C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip'
USERNAME = `drothe'
ORA9_HOME_WIN = `c:\oracle\ora920'
TEXDOCVIEW_pdf = `cygstart %s'
PROCESSOR_LEVEL = `15'
AUTOSSH_LOGFILE = `/var/log/autossh.log'
ORA81_HOME = `c:/oracle/ora817'
FP_NO_HOST_CHECK = `NO'
SYSTEMDRIVE = `C:'
ORA81_HOME_WIN = `c:\oracle\ora817'
JAVA_HOME = `c:/jdk1.2.2'
TEXDOCVIEW_html = `cygstart %s'
USERPROFILE = `C:\Documents and Settings\drothe'
ORA9_HOME = `c:/oracle/ora920'
ORA_HOME = `c:/oracle/ora817'
PS1 = `\! \W> '
LOGONSERVER = `\\TELA'
HISTIGNORE = `[   ]*:&:bg:fg:exit'
PROCESSOR_ARCHITECTURE = `x86'
HISTCONTROL = `ignoredups'
PERLDOC_PAGER = `less -isrR'
SHLVL = `1'
COLORFGBG = `0;default;15'
OSTYPE = `cygwin'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
JPROFILER_JAVA_HOME = `c:\jdk1.4.2'
HOMEDRIVE = `C:'
COMSPEC = `C:\WINDOWS\system32\cmd.exe'
TMP = `/c/DOCUME~1/drothe/LOCALS~1/Temp'
SYSTEMROOT = `C:\WINDOWS'
PRINTER = `hp7410'
CVS_RSH = `/usr/local/bin/ssh-noescape'
PROCESSOR_REVISION = `0209'
PKG_CONFIG_PATH = `/usr/X11R6/lib/pkgconfig'
TEXDOCVIEW_ps = `cygstart %s'
PROMPT_COMMAND = `echo -ne "\033]0;[EMAIL PROTECTED]: ${PWD}\007"'
INFOPATH = `/usr/local/info:/usr/share/info:/usr/info:'
WL_HOME = `c:/weblogic510'
PROGRAMFILES = `C:\Program Files'
DISPLAY = `:0'
WL81_HOME = `c:/bea/weblogic81'
NUMBER_OF_PROCESSORS = `2'
SESSIONNAME = `Console'
GNU_HOME = `c:/cygwin'
COMPUTERNAME = `TELA'
COLORTERM = `rxvt-xpm'
_ = `/usr/bin/cygcheck'
POSIXLY_CORRECT = `1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_US

bash 3.1-1 "exec -l" doesn't start login shell

2006-01-11 Thread David Rothenberger
"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.

It works in 3.0-14.

I'm using a self-built DLL from 20060109 16:00:41.

-- 
David Rothenbergerspammer? -> [EMAIL PROTECTED]
GPG/PGP: 0x92D68FD8, DB7C 5146 1AB0 483A 9D27 DFBA FBB9 E328 92D6 8FD8

Philadelphia is not dull -- it just seems so because it is next to
exciting Camden, New Jersey.

Cygwin Configuration Diagnostics
Current System Time: Wed Jan 11 15:41:12 2006

Windows XP Professional Ver 5.1 Build 2600 Service Pack 2

Path:   C:\cygwin\home\drothe\bin
C:\cygwin\usr\local\bin
c:\cygwin\bin
c:\jdk1.2.2\bin
c:\oracle\ora817\bin
c:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\program files\gpg-1.4.2
C:\cygwin\sbin
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Program Files\Executive Software\Diskeeper\
c:\MSSQL7\BINN
c:\Program Files\ATI Technologies\ATI Control Panel
c:\Program Files\QuickTime\QTSystem\
c:\Program Files\SSH Communications Security\SSH Secure Shell
C:\cygwin\lib\lapack

Output from c:\cygwin\bin\id.exe (nontsec)
UID: 1003(drothe)   GID: 513(None)
0(root) 513(None)   544(Administrators) 545(Users)

Output from c:\cygwin\bin\id.exe (ntsec)
UID: 1003(drothe)   GID: 513(None)
0(root) 513(None)   544(Administrators) 545(Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = `drothe'
PWD = `/c/temp'
CYGWIN = `server'
HOME = `/home/drothe'
MAKE_MODE = `unix'

HOMEPATH = `\Documents and Settings\drothe'
MANPATH = `/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man:/usr/X11R6/man'
APPDATA = `C:\Documents and Settings\drothe\Application Data'
SSH_AGENT_PID = `7712'
HOSTNAME = `tela'
ORA_HOME_WIN = `c:\oracle\ora817'
TERM = `xterm'
PROCESSOR_IDENTIFIER = `x86 Family 15 Model 2 Stepping 9, GenuineIntel'
WINDIR = `C:\WINDOWS'
PERLIO = `perlio'
TEXDOCVIEW_txt = `cygstart %s'
CVSROOT = `:ext:[EMAIL PROTECTED]:/home/drothe/cvsroot'
TEXDOCVIEW_dvi = `cygstart %s'
WINDOWID = `4734320'
OLDPWD = `/home/drothe'
USERDOMAIN = `TELA'
OS = `Windows_NT'
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
!:: = `::\'
LS_COLORS = 
`no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*.mpc=01;35:*.ogg=01;35:*.wav=01;35:'
TEMP = `/c/DOCUME~1/drothe/LOCALS~1/Temp'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
SSH_AUTH_SOCK = `/tmp/ssh-0dO2sxYorp/agent.4396'
QTJAVA = `C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip'
USERNAME = `drothe'
ORA9_HOME_WIN = `c:\oracle\ora920'
TEXDOCVIEW_pdf = `cygstart %s'
PROCESSOR_LEVEL = `15'
AUTOSSH_LOGFILE = `/var/log/autossh.log'
ORA81_HOME = `c:/oracle/ora817'
FP_NO_HOST_CHECK = `NO'
SYSTEMDRIVE = `C:'
ORA81_HOME_WIN = `c:\oracle\ora817'
JAVA_HOME = `c:/jdk1.2.2'
TEXDOCVIEW_html = `cygstart %s'
USERPROFILE = `C:\Documents and Settings\drothe'
ORA9_HOME = `c:/oracle/ora920'
ORA_HOME = `c:/oracle/ora817'
PS1 = `\! \W> '
LOGONSERVER = `\\TELA'
HISTIGNORE = `[   ]*:&:bg:fg:exit'
PROCESSOR_ARCHITECTURE = `x86'
HISTCONTROL = `ignoredups'
PERLDOC_PAGER = `less -isrR'
SHLVL = `1'
COLORFGBG = `0;default;15'
OSTYPE = `cygwin'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
JPROFILER_JAVA_HOME = `c:\jdk1.4.2'
HOMEDRIVE = `C:'
COMSPEC = `C:\WINDOWS\system32\cmd.exe'
TMP = `/c/DOCUME~1/drothe/LOCALS~1/Temp'
SYSTEMROOT = `C:\WINDOWS'
PRINTER = `hp7410'
CVS_RSH = `/usr/local/bin/ssh-noescape'
PROCESSOR_REVISION = `0209'
PKG_CONFIG_PATH = `/usr/X11R6/lib/pkgconfig'
TEXDOCVIEW_ps = `cygstart %s'
PROMPT_COMMAND = `echo -ne "\033]0;[EMAIL PROTECTED]: ${PWD}\007"'
INFOPATH = `/usr/local/info:/usr/share/info:/usr/info:'
WL_HOME = `c:/weblogic510'
PROGRAMFILES = `C:\Program Files'
DISPLAY = `:0'
WL81_HOME = `c:/bea/weblogic81'
NUMBER_OF_PROCESSORS = `2'
SESSIONNAME = `Console'
GNU_HOME = `c:/cygwin'
COMPUTERNAME = `TELA'
COLORTERM = `rxvt-xpm'
_ = `/usr/bin/cygcheck'
POSIXLY_CORRECT = `1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\moun