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

Eric Blake ericblake@comcast.net
Thu Jan 12 05:26:00 GMT 2006


> "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 <stdio.h>
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

-------------- next part --------------
An embedded message was scrubbed...
From: David Rothenberger <daveroth@acm.org>
Subject: bash 3.1-1 "exec -l" doesn't start login shell
Date: Thu, 12 Jan 2006 00:23:56 +0000
Size: 50063
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060112/c0dfa0c4/attachment.eml>
-------------- next part --------------
--
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/


More information about the Cygwin mailing list