Re: Bash monitor mode remains enabled if disabled in .bashrc
- Date: Thu, 31 Aug 2017 11:50:39 -0400
- From: cyg Simple <cygsimple@xxxxxxxxx>
- Subject: Re: Bash monitor mode remains enabled if disabled in .bashrc
Keep responses to the list and not the individual responders.
Forwarded on your behalf.
On 8/31/2017 10:32 AM, Michel LaBarre wrote:
> Thanks for the reply.
> Quick answer (repeated interleaved below):
> - my .bash_profile does indeed source .bashrc
> - I added an echo to .bashrc to be doubly sure - it displays as expected
>> -----Original Message-----
>> From: cygwin-owner@xxxxxxxxxx [mailto:cygwin-owner@xxxxxxxxxx] On
>> Behalf Of cyg Simple
>> Sent: August-31-17 8:31 AM
>> To: cygwin@xxxxxxxxxx
>> Subject: Re: Bash monitor mode remains enabled if disabled in .bashrc
>> On 8/30/2017 7:26 PM, Michel LaBarre wrote:
>>> Playing with set -m/+m and shopt -s lastpipe, in an interactive bash shell,
>>> I came across a situation
>>> which is minor unless it has broader implications for others that I do not
>>> know about.
>>> Specifically if "set +m" is present in .bashrc, it looks like job control
>>> (monitor mode) is off
>>> in an interactive shell (as per "echo $-") but it is actually on.
>>> I ran into this with "shopt -s lastpipe" behaviour with and without job
>>> I can also reproduce it with "sleep 25&" then "fg" will fail with "no job
>>> If I "set +m" within the interactive shell rather than, or in addition to,
>>> .bashrc, both the
>>> flags ($-) and behaviour (lastpipe and fg) reflect job control being off.
>> Are you sure that .bashrc is being sourced? The initial start of an
>> interactive shell doesn't read .bashrc by default. It reads
>> bash_profile when starting interactive mode. Now most likely your
>> bash_profile contains lines to check the existence of .bashrc and
>> source it but you need to check.
> My .bash_profile does indeed source .bashrc
> I added an echo to .bashrc to be doubly sure - it displays as expected> --
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple