public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin@cygwin.com
Cc: schulman.andrew-65bELFHSwm+NwwpopWmoRw@public.gmane.org
Subject: Re: screen  4.0.3-5 does not respect $SHELL
Date: Wed, 13 Oct 2010 14:31:00 -0000	[thread overview]
Message-ID: <4CB5C2D1.6010702@dronecode.org.uk> (raw)
In-Reply-To: <bt49b6pipkvps8m1thfoptvk4gbu6qr9qq@4ax.com>

On 12/10/2010 18:00, Andrew Schulman wrote:
>> Initially SHELL=/bin/bash when using a link in start menu.From initial bash prompt, i start screen, fresh session. There all kinds of bash misbehavior occur, including ~/.bashrc having no effect. Apparent reason for that is that $SHELL becomes /bin/sh instead of /bin/bash within screen.
>> A workaround is to start screen asscreen -s /bin/bashor have shell specified in .screenrc. Then bash works as expected. That screen does not respect $SHELL seems to be a bug though.
>> Thanks to jturney from #cygwin for helping me pinpoint the problem.
>> -anna 		 	   		
>
> Hm... odd.  I'm not able to reproduce this.  I have SHELL=/bin/bash both
> inside and outside of screen, and I haven't adjusted it either on the
> command line or in .screenrc.  /etc/screenrc doesn't set it either.
>
> Can anyone else verify this?

I can reproduce this problem.

The problem seems to be caused by the fact that bash sets SHELL, but does not 
export it by default, so screen doesn't inherit it and sets SHELL=/bin/sh.

jon@byron ~
$ echo $SHELL
/bin/bash

jon@byron ~
$ export -p | grep SHELL

jon@byron ~
$ screen

jon@byron ~
$ echo $SHELL
/bin/sh


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2010-10-13 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 16:26 Anna Z.
2010-10-12 17:00 ` Andrew Schulman
2010-10-13 14:31   ` Jon TURNEY [this message]
2010-10-13 15:22     ` Andrew Schulman
2010-10-13 15:29       ` Eric Blake
2010-10-13 15:32         ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CB5C2D1.6010702@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin@cygwin.com \
    --cc=schulman.andrew-65bELFHSwm+NwwpopWmoRw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).