This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bash monitor mode remains enabled if disabled in .bashrc
- From: cyg Simple <cygsimple at gmail dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 31 Aug 2017 11:50:39 -0400
- Subject: Re: Bash monitor mode remains enabled if disabled in .bashrc
- Authentication-results: sourceware.org; auth=none
- References: <000701d321e7$6ed52220$4c7f6660$@rogers.com> <54420842-610d-aa87-5000-5c531cf7d2a1@gmail.com> <000601d32265$f9f85880$ede90980$@rogers.com>
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@cygwin.com [mailto:cygwin-owner@cygwin.com] On
>> Behalf Of cyg Simple
>> Sent: August-31-17 8:31 AM
>> To: cygwin@cygwin.com
>> 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
>>> control.
>>> I can also reproduce it with "sleep 25&" then "fg" will fail with "no job
>>> control".
>>>
>>> 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> --
>
--
cyg Simple
--
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