Re: Bash monitor mode remains enabled if disabled in .bashrc
- Date: Thu, 31 Aug 2017 08:31:22 -0400
- From: cyg Simple <cygsimple@xxxxxxxxx>
- 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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple